[Tutor] Automating Windows (Maintenance)
Alan Gauld
alan.gauld at btinternet.com
Tue Jul 3 09:01:13 CEST 2007
"Tiger12506" <keridee at jayco.net> wrote
> The cleanup temp files is more difficult. It depends on how much you
> want to
> do. Usually it is sufficient to delete the contents of the
> windows/temp
> folder. This will delete cookies, temporary files, internet temp
> files that
> are commonly cleaned up by sys admin. So you can add os.system('del
> /s /f
> /s /q C:\windows\temp\*')
For deleting files you get more control doing it from within Python.
os.remove() will delete files.
> For checking processes, you can search for a tool on the internet
> that lists
> currently running processes.
Again this kind of thing can be done with the _winreg module for
reading the registry. (or using WSH)
> If you are really interested in a program that does this, I could be
> encouraged to write one for you (in C) - Although, it would most
> certainly
> be better to find api s that allow you to do this in python. Google.
All the windows APIs are available to Python, no C required.
See the recent threads on mouse events for more on that topic.
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list