Discussion Locked

Deleting temporary files at start in XP

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I tried using an autoexec.bat file, and adding a line in the Environment variables, but neither seems to work. How do I delete temp files, dat files and so on when my system reboots, or jast at a specific time daily?

3 replies

by dmiles

See the following sites for reference to deleteing temp files
1)http://hardwareshell.com/bootclean.htm
2)http://members.truepath.com/delphi/tips/tip76_deletetempfiles1.htm
3)www.personal-computer-tutor.com/deletingtempfiles.htm

by E.Eliveld

First you have to know where the temp files are and what extension they have. If you want to delete the *.tmp in your temp folder and the windows folder you can write a batch that you will put somewhere in windows.

Example:

you have *.tmp files in your windows folder. Create a folder COMMAND in the windows folder calling it CLEAN_TMP.BAT. Add the lines

c:
cd c:\windows
del *.tmp /q

in it. put a shortcut in the startup folder. Everytime you start the computer the batch file will be executed. Off course you can add more lines to delete other filetypes on other locations. Be sure you test every line using a temp folder and some types of files in it you want to delete!!!!

If you are SURE WHAT YOU ARE DOING you can try a lineslike:

c:
cd\
DEL *.TMP /S /Q

For more information about the DEL command type DEL/? in a dosbox.

If you put a task in the scheduler it will run during the moment you have added.

Good luck!

This discussion is closed to new replies.