On 4/26/2010 2:01 PM On a whim, Tommy D pounded out on the keyboard
> I'm looking for a program that will run on startup that will clean out all
> temp files. When I Google this, I get all sorts of things which I don't
> have confidence in. I am running on Windows xp pro.
>
> I would appreciate a recommendation on an app to run on start up. For now
> I've been using TFC which I run once the computer is up and running.
> However, it then restarts the system.
>
>
> TIA
Hi Tommy,
You can create a batch file and use commands like:
del /s /q %temp%\*.*
That will remove all files in the temp folders/subfolders, but it does
not remove the empty sub-folders.
You could also use:
rd /s /q %temp%
md %temp%
but it's a little strange to me to have to resort removing the folder
and re-creating it in order to empty it.
I use an old Win9x utility called deltree.exe that works fine in later
versions of Windows. You can find it easily using Google, and the command:
deltree.exe /y %temp%
empties the temp folders without removing the folder. If you have two
different locations for your TEMP or TMP variables, you can use:
deltree.exe /y %temp%
deltree.exe /y %tmp%
One location to download the file is here:
http://www.uv.tietgen.dk/staff/mlha/download/dos/#DELTREE
Once you have created the batch file and tested it, you can add the
batch file using gpedit.msc (Start, Run, gpedit.msc, click OK) in
Computer Configuration/Windows Settings/Scripts/Shutdown. Add the file
and it will be executed on Shutdown.
Terry R.
--
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.