If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
cmd file to delete Internet junk
Hi
I would like to write a cmd file that clean the temporary files (Internet junk) for several users. The file has to: 1. search all or some of the files from "C:\Documents and Settings\user\Local Settings\Temporary Internet Files" for several users. 2. delete the founded files Other ideas how to delete junk for several users at once without 3rd party software R welcome (group policy ?). Thanx. |
Ads |
#2
|
|||
|
|||
cmd file to delete Internet junk
"Crios" wrote in message ... Hi I would like to write a cmd file that clean the temporary files (Internet junk) for several users. The file has to: 1. search all or some of the files from "C:\Documents and Settings\user\Local Settings\Temporary Internet Files" for several users. 2. delete the founded files Other ideas how to delete junk for several users at once without 3rd party software R welcome (group policy ?). Thanx. Here you go: @echo off set Accounts=Crios Pjotr James Anne set Path1=C:\Documents and Settings\ set Path2=Local Settings\Temporary Internet Files\Content.IE5 for %%a in (%Accounts%) do call :Sub %%a goto :eof :Sub set Dir=%Path1%\%1\%Path2% if not exist "%Dir%" goto :eof echo Processing "%Dir%" for /F %%b in ('dir /ad /a /b "%Dir%" ^| find /v "."') do echo rd /s /q "%Dir%\%%b" Instructions: 1. Copy & paste these lines into your cmd/bat file. 2. Adjust Line 2 to reflect your account names. 3. Run the batch file and examine the screen output carefully. 4. Remove the word "echo" in the last line to activate the batch file. 5. Run it again. Note that the last line is a long line. In starts with the word "for". |
Thread Tools | |
Display Modes | |
|
|