Automate deletion of Temp files in Vista

on Friday, December 4, 2009

Let me show how you can automate the process of deletion of Temp files in Windows Vista.


Open notepad and type the following exactly as it is

cd C:\Users\%username%\AppData\Local
rmdir /S /Q Temp
I guess your OS is installed in C drive.  If it is not then you should change the drive letter from the above command.

Save this file as a .bat file and give it some meaningful name like TempClean.bat.

After having saved the file, go to the startup folder and paste a shortcut of the file there.  And there you go.  Everytime the Windows boots up, your Temp files are automatically deleted.


For Windows XP, the code would be



cd C:\Documents And Settings\%username%\Local Settings
rmdir/s /q Temp
Home


Subscribe via RSS