A Windows XP help forum. PCbanter

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.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

cmd file to delete Internet junk



 
 
Thread Tools Display Modes
  #1  
Old December 6th 08, 10:53 AM posted to microsoft.public.windowsxp.general
Crios
external usenet poster
 
Posts: 28
Default 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  
Old December 6th 08, 04:14 PM posted to microsoft.public.windowsxp.general
Pegasus \(MVP\)[_2670_]
external usenet poster
 
Posts: 1
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 06:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.