Automatically Delete Temporary Files in Windows 7 [How To]

Posted: August 5, 2015 in Uncategorized
Tags: , , , , , , , , , , , ,

The Windows Disk Clean up Wizard will delete your temporary files, but only if they are over a week old. To create a simple batch script that will clean up your temporary directories, do the following:

Creating the Batch File to Clean Temporary Files

  1. Open Notepad and type the following:

cd C:\Users\%username%\AppData\Local
rmdir /S /Q Temp

  1. Save the file as cleantemp.bat
  2. Now double click on the file to remove your temporary files and free up space on your computer

If this doesn’t work and gives an access error, try replacing %username% with you windows login username.

Automating the Process of Deleting Temporary Files

To automate this process, so you do not need to remember to run it, do the following:

  1. Right click on the batch file and select create shortcut
  2. Place the shortcut in your startup folder in the start menu

Now when you log in to Windows 7, your temporary files will be deleted.

Advertisements
Comments
  1. […] Automatically Delete Temporary Files in Windows 7 [How To]. […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s