Delete Temp Files Globally

G

Guest

Is there a way to delete temporary internet files from all the individual
User Profiles. I have common area machine with 80 user profiles, and each is
loaded with Internet Temp Files...
 
P

Pegasus

Michael said:
Is there a way to delete temporary internet files from all the individual
User Profiles. I have common area machine with 80 user profiles, and each
is
loaded with Internet Temp Files...

You could run this batch file:

@echo off
for /d %%a in ("c:\Documents and Settings\*.*") do
echo rd /s /q "%%a\local settings\temporary internet files\content.ie5"
echo md "%%a\local settings\temporary internet files\content.ie5"
)

Remove the two "echo" words to activate the batch file.
 
J

JS

Take a look at CCleaner as a tool to remove Internet history info, cookies,
temp files, auto complete and other junk.
In the 'Windows' tab check the item types you want deleted in the list.
Then use Options/Custom to add the folders you want files deleted from.

http://www.ccleaner.com/

JS
 
G

Gary S. Terhune

CCleaner, like Windows Disk Cleanup, apparently only flags TIFs from the
current user, not from all users.
 
A

Alias

JS said:
Just ran a test and it did remove TIFs from multiple users.

JS

Must be an update as it didn't do that before. Glad to hear that it's
changed.

Alias
 
G

Guest

I wound up using the FOR... along with the RD... but the MD... didn't run in
the For loop so I just omitted the command as I didn't think it needed to be
recreated...

Thanks!
 
G

Guest

Thanks to "JS", "Alias", "Gary" and "Pegasus"... this was my first post and I
appreciate how you all tried to help me. I used "Pegasus'" FOR loop idea and
that cleaned out what I needed...

I tried CCCleaner 1.30 and 1.40, adn I only got it to "clean" the current
account... not all the other profiles... but I forgot how useful that tool
was... alot of times the user's want to "clean" their home computers, and I
can direct them to that product... as an alternative to Disk Cleanup...

Thanks again :)
 
P

Pegasus \(MVP\)

That's because the line
for /d %%a in ("c:\Documents and Settings\*.*") do
should have read
for /d %%a in ("c:\Documents and Settings\*.*") do (
 
J

JS

You're Welcome.

JS

Michael said:
Thanks to "JS", "Alias", "Gary" and "Pegasus"... this was my first post
and I
appreciate how you all tried to help me. I used "Pegasus'" FOR loop idea
and
that cleaned out what I needed...

I tried CCCleaner 1.30 and 1.40, adn I only got it to "clean" the current
account... not all the other profiles... but I forgot how useful that
tool
was... alot of times the user's want to "clean" their home computers, and
I
can direct them to that product... as an alternative to Disk Cleanup...

Thanks again :)
 
M

Mark F.

Terry R. said:
On 6/26/2007 10:09 AM On a whim, Mark F. pounded out on the keyboard


No mention of whether it would work with multiple profiles though.

I tried it and it did not remove the files under the Administrator profile.

Mark
 
G

Guest

I see, multiple cmds are enclosed inside of the FOR with ( )... Thanks!

And thanks for this example... it can be applied to a number of problems
when dealing with common area machines... Thanks again to all!
 
P

Pegasus \(MVP\)

Thanks for the feedback. Note that there is more to the "for ( )"
syntax than meets the eye. Play with it, then post again when
you get unexpected and unexplainable results.
 
T

Terry R.

On 6/27/2007 5:42 AM On a whim, Pegasus (MVP) pounded out on the keyboard
Thanks for the feedback. Note that there is more to the "for ( )"
syntax than meets the eye. Play with it, then post again when
you get unexpected and unexplainable results.

Pegasus,

Nice. I usually have a clean temp batch file run on workstations that I
configure that uses the %temp% & %tmp% variables to clean the folders
out, but this will come in handy for a quick sweep on all profile temp
folders, by changing the path locations.

Thanks for this,

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 

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