Re: Delete all files in certain folders across multiple users
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Wed, 6 Feb 2008 18:07:07 +0100
"Rhenestofel" <rhenestofel@xxxxxxxxx> wrote in message
news:433b1c80-962e-4e96-b623-ecfb43607ecd@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hey,
I am fairly new at this and trying to create a script that will delete
all files out of a folder in a users account for instance the cookies:
Something like this
------
Const DeleteReadOnly = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile ("C:\Documents and Settings\(ALL ACCOUNTS ON THE
SYSTEM)\Cookies\*.*"), DeleteReadOnly
------
only i want it to go through multiple folders in the same manner
here is the list of folders
C:\Documents and Settings\%user name%\Cookies\*.*
C:\Documents and Settings\%user name%\Local Settings\History
\History.IE5\*.*
C:\Documents and Settings\%user name%\Local Settings\Temp\*.*
C:\Documents and Settings\%user name%\Local Settings\Temporary
Internet Files\*.*
C:\Documents and Settings\%user name%\UserData\*.*
Any help would be greatly appriciated.
Rich
Seeing that you wish to delete all files in the UserData folder,
why not delete the parent %UserName% folder? It would
simplify your job considerably!
You also need to state if you want to delete the files in
the nominated ***folders*** or in the ***folder trees***.
Lastly: If you want to use this as an exercise in VB scripting,
fine. If you just want a tool to do the job then a batch file
would require far fewer lines of code, largely because can
use commands with inbuilt recursive facilities. With VB
Scripting you have to design them yourself.
.
- Follow-Ups:
- Re: Delete all files in certain folders across multiple users
- From: Rhenestofel
- Re: Delete all files in certain folders across multiple users
- References:
- Delete all files in certain folders across multiple users
- From: Rhenestofel
- Delete all files in certain folders across multiple users
- Prev by Date: RE: Win32_Directory collection has no Count value & for eaach loop han
- Next by Date: how to tell login script not to run on server O/S
- Previous by thread: Delete all files in certain folders across multiple users
- Next by thread: Re: Delete all files in certain folders across multiple users
- Index(es):
Relevant Pages
|