Perhaps, a more stable solution would be:
@echo off
echo Please wait, deleting temp files...
cd %temp%
echo This may take a while, depending on how long since you last did this.
del *.* /Q
echo Temporary files have been deleted.
This will delete temp files in the designated temp directory, excluding any that are in use. Don't try this on DOS, because the %temp% variable is set to C:\DOS, so you'd end up deleting DOS

.
Also, if you wanted the code to execute any faster, you could convert it to a COM file. Google for "bat2exe" and run it on your batch file.
Hope that remotely helped,
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Offline 73 posts
since Oct 2005