Categorized | Tips

Automatically Delete Temporary Files In Windows 7

Posted on 25 November 2009

<!– /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:”"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:”Times New Roman”; mso-fareast-font-family:”Times New Roman”;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} –>
Windows 7 comes with the Disk Clean-up Wizard like Windows Vista and XP, but that utility only deletes your temporary files if they are more than a week old. You can automate the process by creating a simple batch file and then making it run at start-up so that you never have to worry about manually freeing up space from you Temp folder.

  • Open Notepad and click on File > Save As.
  • In the File Name dialog box, Type “tempclean.bat”
  • Change the entry in Save As, Type dropdown box to “All files”
  • Click on save
  • Then in your file, type the following:

cd C:\

Users\%user%\

AppData\Local

Rmdir /S / Q Temp

  • Save the File
  • Navigate to the folder where the file is saved
  • Right-click on it and click on ‘Create Shortcut’
  • Place this shortcut in your ‘startup’ folder in you Start Menu.

Every time you log in to Windows, the file will be executed and your temporary files will be cleaned. This is very useful for notebooks and laptops with small hard-disk space. In case you get an access error while the file is being executed, replace %username% in the file with you Windows login username.

  • Share/Bookmark

Related posts:

  1. Windows 7 Search Within Zip Files:
  2. Delete Duplicate Files Using “Auslogics Duplicate File Finder”
  3. “NexusFile”–Amazing Download for Windows, Alternative for Windows Explorer
  4. Disabling Disk Space Check In Windows 7
  5. Find Files and Folders Occupying More Disk Space: Free Disk Usage Analyzer

This post was written by:

webtech - who has written 1784 posts on Website Technology Point.


Contact the author

Leave a Reply