Dec 23, 2010

Automatically Clear Temp Files At StartUp



                                      There are a lot of junk files created in Windows by default. The Disk Clean up Utility in Windows help us to remove the system Clutter upto a certain extent. Disk Cleanup can also remove the outdated or older restore points being created by System Restore which we may not need. But there are many temporary files that the Disk Clean up utility of Windows won't clean, by default. We can configure Windows to clean up those unnecessary junk files, thereby, making more space available on the Hard Drive.




Here we are not going to do anything with the Disk Clean up utility but we will be creating a small batch file that does the same clean up job as the Disk Clean up utility does. 

Here's how we can achieve this (The steps apply to Windows XP):


1. Open the Notepad and type the following in it.


2. del /s /q “C:\Documents and Settings\<Username>\Local Settings\Temp\*.*”


3. You need to replace <Username> with the Username you have logged in with, into Windows.


4. Now save the file as a bat file. To do this select “Save As” option from notepad and select “All Files” from “Save as type” tab. and give the file name as TempKill.bat.


5. When you want to clean the temporary files you can run this file.


6. If you want this to run this automatically during Startup just place the file in the start up folder of Windows. To do this, go to this location, C:\Documents and Settings\<Username>\Start Menu\Programs\Startup

This file runs as a startup program after login.





That’s it! From now on the files in the temp folder will be cleaned automatically at Windows Start Up.


1 comments:

Will this slow the booting of the PC?

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More