PC Review


Reply
Thread Tools Rate Thread

cmd file to delete Internet junk

 
 
Crios
Guest
Posts: n/a
 
      6th Dec 2008
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.


 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      6th Dec 2008

"Crios" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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".


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I cannot delete junk emails from the "Junk Email" folder Craig Microsoft Outlook Discussion 1 30th Dec 2008 02:21 AM
Junk E-mails Option-"Permanently delete suspected junk e-mail ..." yifeijia Microsoft Outlook Discussion 1 27th Jun 2008 07:14 PM
can i delete a file on www (internet) johnny Windows XP Help 1 10th Mar 2006 02:25 AM
Outlook junk mail filter to permanently delete junk mail =?Utf-8?B?YnJpZGdla2lkMg==?= Microsoft Outlook Installation 0 1st Dec 2004 08:11 PM
Delete junk mail when adding to junk list simultaneously? Colin Microsoft Outlook Discussion 4 23rd Feb 2004 11:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:45 PM.