what command(s) to use???

E

Eddie

im trying write a batch file to delete all cookies and
temp files in each users profile, but not sure what
command(s) to use to go from one user profile to the next
without using the users name in the batch file. any help
would be great. thanks
 
W

wadester

im trying write a batch file to delete all cookies and
temp files in each users profile, but not sure what
command(s) to use to go from one user profile to the next
without using the users name in the batch file. any help
would be great. thanks

You can probably use the %USERPROFILE% and/or %USERNAME% variables.

ws
 
E

Eddie

thank you but, that is only for the user that is logged in
at the time. i need to delete the cookies and temp files
in lets say joes profile and then the script will move on
to mikes profile then to john and so on. how can i do this
without putting in the users name in the batch file?
thanks angain for the reply
 
R

Ray McCormick

Eddie said:
im trying write a batch file to delete all cookies and
temp files in each users profile, but not sure what
command(s) to use to go from one user profile to the next
without using the users name in the batch file. any help
would be great. thanks


I use XXCOPY, a Versatile File Management Utility---Boldly
Extended Xcopy (www.xxcopy.com):

The next is all one line:
xxcopy "C:\Documents and Settings\*\Cookies\*.*" /ed
/h/pd0/r/rs/s/y/oA%ErrorLog%/Fo%TempFilesList%/EX%Ignore%

This is my exact command line under W2k
You may not want /oA - append log file, /Fo - list files deleted,
/EX - a list of cookie files not to delete.
The \*\ allows more than one consecutive 'any' folder in the
path.
[Xxcopy has so many more switches than xcopy that I would not
expect to be able to modify this to use xxcopy].

Other temp files can be treated similarly, though I haven't yet
got this to work with 'Temporary Internet Files'.

Ray
 
W

wadester

thank you but, that is only for the user that is logged in
at the time. i need to delete the cookies and temp files
in lets say joes profile and then the script will move on
to mikes profile then to john and so on. how can i do this
without putting in the users name in the batch file?
thanks angain for the reply

What about something like this (used "local settings\temp" as an
example):

for /d %I in ("c:\documents and settings\*.") do pushd %I&&cd "local
settings\temp"&&del /q *.*&&popd

Double the % in a batch file. Also requires command extensions be
enabled.

ws
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top