2010/05/08

Me vs. Windows XP: Clearing out the temp files

It's very nice to be working at a big mature organisation however there are also drawbacks. One such drawback is the rigorous security of which one part is having to work against a server all the time and the other is having to use Windows XP. When I work from home all my files need to be synced to the server. Since this includes all files it also includes all the temp files (temp files are temporary backup files that applications write and then usually forget to clean up afterwards).

To minimize the wait I have written a small script that removes all the temp files in the Windows\Temp directory as well as my own Temp catalogue.

So if you are in a similar position or just don't like having your computer cluttered with thousands of small abandoned files, fire up Notepad and enter:

del /f /s /q C:\windows\temp\
del /f /s /q "C:\Documents and Settings\%USERNAME%\Local Settings\Temp\"

Save the file with the ending .bat (you need to select all files in the Save As dialogue) and drop it into your Start up items directory. You'll find it by accessing the start menu and right click explore on it.

Now every time you log in all those files will be a thing of the past. But don't try this if you don't know what you are doing.

No comments: