Re: How to delete temp files



You will always get "File in use" messages, because some temp
files are in use while Windows is up and running. Here is the
solution with logging added:
@echo off
echo.
echo Cleaning out the Temp directory
del /q "%temp%" 1>c:\DelTemp.txt 2>&1
notepad c:\DelTemp.txt
"DonV" <dvonj@xxxxxxxxxxx> wrote in message news:OBQ88v8TIHA.3940@xxxxxxxxxxxxxxxxxxxxxxx
Coolio thanks.
Anyway to get around the Access Denied in Vista and the file is in use by another process? In other words is the a switch that will force the deletions?
"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message news:eKT0Ao8TIHA.748@xxxxxxxxxxxxxxxxxxxxxxx
Here we go. Save the following lines in c:\Windows\DelTemp.bat,
then create a link to it.
@echo off
echo.
echo Cleaning out the Temp directory
del /q "%temp%"
ping localhost -n 10 > nul

"DonV" <dvonj@xxxxxxxxxxx> wrote in message news:OISALm8TIHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
I would like a script that I can click on and have it delete all the files in the temp directory. It would be even more useful if the script can run on Vista as well as XP.

Anybody have such a script and how it can be used this way?

Relevant Pages

  • RE: Proxy server hit... Any ideas?
    ... More so just using it as another server to add to their list. ... echo Compiling New Security Policy ... ... echo >> temp ... This list is provided by the SecurityFocus ARIS analyzer service. ...
    (Incidents)
  • Proxy server hit... Any ideas?
    ... echo Compiling New Security Policy ... ... echo >> temp ...
    (Incidents)
  • Re: Text::Aspell
    ... echo Aberystwyth>> words ... -bash-3.00$ mkdir temp ... Use of uninitialized value in array element at chas.pl line 18. ...
    (perl.beginners)
  • RE: Proxy server hit... Any ideas?
    ... You should definitively remove the sample script folder from a ... > del temp ... > echo Compiling New Security Policy ... ...
    (Incidents)
  • RE: Proxy server hit... Any ideas?
    ... > echo Description=Default Security Settings. ... >>> temp ... > This list is provided by the SecurityFocus ARIS analyzer service. ... and tracking system please see: http://aris.securityfocus.com ...
    (Incidents)