November 11th, 2001, 06:50 PM
Delete TEMP files in DOS?
I have seen posts stating that they put DOS commands in the autoexec.bat to rid PC of temp files upon boot. My question is, is it better in any way to delete the files in DOS rather than deleting them through windows? I had read a while back that deleting in DOS does a more thourough job? is it true?
November 11th, 2001, 07:17 PM
Well, if they're gone they're gone.
I'd advise against emptying C:\Windows\Temp through a line in your Autoexec.bat, since some programs during install put stuff in your temp directory that they need on reboot in order to complete the installation.
You could make a batch file for emptying C:\Windows\Temp that you could activate through a desktop shortcut.
Mine looks like this:
DELTREE /Y C:\WINDOWS\TEMP\*.* > NUL
DELTREE /Y C:\WINDOWS\APPLIC~1\MICROS~1\OFFICE\SHORTC~1\*.TMP > NUL
DELTREE /Y C:\WINDOWS\RECENT\*.* > NUL
As you see it also deletes some other stuff.
Other things like Temp internet files, history, and the like are better suited to be deleted at startup through a line in your Autoexec.
Take a look here for some tips: http://www.pcforrest.freeserve.co.uk/deltemps_bat.htm
Good luck, Tony
November 11th, 2001, 07:35 PM
To delete everything except cookies in the c:\Windows\Temporary Internet file:
Do a computer restart.
Hold down the "Ctrl" key during restart until you get the "Startup Menu".
(It may stop part way through and ask you to hit "Esc" to continue.)
A menu will appear.
With the down arrow, scroll down to "Command Prompt Only"
Type: deltree /y windows\tempor~1
Note: there is a space after "deltree" and after "/y"
The computer will grind on for awhile depending on how many temporary internet files you have accumulated. When it's done you'll see:
You'll probably have to do a Ctrl+Alt+Del to restart your computer.
There are some utility programs that also delete all the files.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)