Web Analytics


Windows Guides Feed
    Home Basics Windows 7 Windows Vista Windows XP Software Freebies Forums About Follow via RSS  Follow via Twitter  Follow via Facebook  Follow via Email   


Windows Vista

The Windows Disk Cleanup Wizard will delete your temporary files, but only if they are over a week old. In this guide you will learn how to create a simple batch script that will clean up your temporary directory.

Create the Batch File

Open Notepad and type the following:

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

Automatically Delete Temporary Files in Windows Vista

Save the file as cleantemp.bat

Automatically Delete Temporary Files in Windows Vista

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.

Automate the Process

You can automate this process by right clicking on the file and selecting create shortcut.

Automatically Delete Temporary Files in Windows Vista

Now place the shortcut in your startup folder in the start menu. Now when you log in to Windows Vista, your temporary files will be deleted.

Automatically Delete Temporary Files in Windows Vista


Last 5 posts by Rich



Looking for something else?


Share/Save/Bookmark

Get free books and software from Windows Guides
www.mintywhite.com

Comments

  • Automatically Delete Temporary
    [...] The Windows Disk Cleanup 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 (Vista instructions): [...]
  • snoxd
    Good tip, thanks :)
  • snoxd
    Good tip, thanks :)
  • edward
    how will i know if its work?? i cant see it. thanks
  • edward
    how will i know if its work?? i cant see it. thanks
  • mrogi
    I get this error message:
    "The process cannot access the file because it is being used by another process."
  • mrogi
    I get this error message:
    "The process cannot access the file because it is being used by another process."
  • Rich
    Andrei, where are you having problems?
  • Andrei, where are you having problems?
  • Andrei
    It does not works for me:(
  • Andrei
    It does not works for me:(
  • Rommel
    works great!
    thanks
  • Rommel
    works great!
    thanks
  • Roberto
    Thanks!
  • Roberto
    Thanks!
  • Replace %user_name% with your windows user name.

    If that doesn't work, try right clicking the file and choosing "Run as Administrator..." Let me know if that works...
  • Rich
    Replace %user_name% with your windows user name.

    If that doesn't work, try right clicking the file and choosing "Run as Administrator..." Let me know if that works...
  • Mike
    Hey Rich, I tried this and when I tried to run it, the window popped up but it said "Access is denied" a couple times in the dialogue. Did I do something wrong?
  • Mike
    Hey Rich, I tried this and when I tried to run it, the window popped up but it said "Access is denied" a couple times in the dialogue. Did I do something wrong?
  • James
    Good tip - works just fine for me.
  • James
    Good tip - works just fine for me.
blog comments powered by Disqus


Sponsors / Links
Windows Forums

MVP Profile