Deleting XP Multiple Users Temp Internet Files


Recommended Posts

Hi,

When I go onsite to a clients systems and have to run a vrius checker or scan on their system, it takes ages due to the crap in temporary internet files and temp files.

If the system has one user then it's not so much of a problem as I can quickly delete the temporary internet files and temp files.

The problem I encounter is when there are multiple users on the the system. It takes too long to log in as each user as do the deletion.

Is there an easier way? Maybe a little freeware app that can do the job? OR even a simple batch file to delete all the temp files in one go regardless of how many users?

Hope I've explained myself correctly :) and hope someone can come up with a good idea :)

Many thanks

I know I can log in as Administrator and set "Folder Options" to "Show hidden files and folders", then delete the contents of "Temporary Internet Files" and "Temp" under the "Local Settings" folder for each user.

But that is long and tedious. I'm hopinh a simple batch file or standalone exe app could do it. I don't want to have to install an app on the users pc to do the task.

I know the following batch file will delete the contents of "Temporary Internet Files" for the currently logged on user...

RD "%Systemdrive%\documents and settings\%USERNAME%\local settings\Temporary Internet Files\" /S /Q
MD "%Systemdrive%\documents and settings\%USERNAME%\local settings\Temporary Internet Files"

Is there something all those lines that would do it for all user account rather than just the currently logged on user?

I hope I'm explaining myself properly :)

Many thanks

Ok, here's what I've got so far...

REM Written by Sony Nair (UniqueTouch)
REM (http://www.uniquetouch.co.uk)
REM v1.0 02/02/2004
cls
@echo off
title Temp Files Remover for Windows XP
echo.
echo This will delete the follwing files for the currently logged in user on WinXP...
echo.
echo - Windows Prefetch Folder Content
echo - Windows Temp Files
echo - Temp Files Content
echo - Temporary Internet Files Content
echo.
echo Press any key to continue or close this window to exit.
Pause > nul
echo.
echo Emptying Windows Prefetch folder...
del "%Systemdrive%\windows\prefetch\*.*" /q
echo Done.
echo.
echo Removing Windows Temp Files...
rd "%systemdrive%\windows\Temp" /s /q
md "%systemdrive%\windows\Temp"
echo Done.
echo.
echo Removing Temp Files...
rd "%Systemdrive%%homepath%\local settings\Temp\" /s /q
md "%Systemdrive%%homepath%\local settings\Temp"
echo Done.
echo.
echo Removing Temporary Internet Files...
rd "%Systemdrive%%homepath%\local settings\Temporary Internet Files\" /s /q
md "%Systemdrive%%homepath%\local settings\Temporary Internet Files"
echo Done.
echo.
echo.
echo Deletion finished...
echo.
echo Press any key or close this window to exit.
Pause > nul

But the deletion of the "Temp" files and "Temporary Internet Files" is only for the currently logged on user.

Anyone got any ideas of how I can do it for other accounts without hardcosing the account names in?

P.s. I've attched the cmd file in case anyone wants to use what I have done so far.

DelTempFiles_WinXP.zipFetching info...

i want to know this too... :hmmm: it's quite annoying, for similar reasons.

i can think of a workaround:

in internet options, click the advanced tab. scroll to the bottom and check the box labeled "empty temporary internet files folder when browser is closed". whenever a user closes all IE windows (logoff) their cache will be emptied. but this isn't exactly what i'm looking for...

  gameguy said:
i want to know this too... :hmmm: it's quite annoying, for similar reasons.

i can think of a workaround:

in internet options, click the advanced tab. scroll to the bottom and check the box labeled "empty temporary internet files folder when browser is closed". whenever a user closes all IE windows (logoff) their cache will be emptied. but this isn't exactly what i'm looking for...

Thats a good idea gameguy, thanks.

Obviously thats only an otion I can use once I've visited the users machine which will save me the hassle of deleting temp inet files next time round.

I'm sure using CMD Scripting there is a way to figure out to call the user account names and then insert them using variables into a script similar to above.

Anybody able to shed some light on CMD Scripting?

Many thanks

Hi hurtng1,

Thanks for the code...

I understand what you say about how to use the "%%8".

But I would like to understand the code better if I can.

Can you explain the code or if possible point me to a site that has a tutorial?

Many thanks

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Samsung Electronics has multiple subsidiaries. Samsung Display is a subsidiary that deals in screen manufacturing, it's a supply chain-based company where the staff solely care about manufacturing displays. Samsung Electronic's TV and Phone division may have other priorities, for example Samsung TV didn't want to go in on OLED because margins were lower when building the entire TV. Samsung Display's entire existence however now depends on OLED as they couldn't undercut Chinese LCD manufacturers but could compete against LG Display who is the only competitor in that market. Samsung Display has this screen manufacturing investment, but Samsung Mobile may not be willing to reduce their margins for going with a display technology that eats into the phone margins.
    • The weather looks gorgeous, I love the atmosphere of this new area.
    • Similar to what started me on the path to switching to Linux... for the first 6mo of Win10 it was installing an AMD GPU driver that broke audio over HDMI which was essential to me. Driver from AMDs site was fine.
    • I have avoided many deer, a few moose, and other smaller animals during my years of driving and have managed just fine with only ABS and ESP, both of which can also be problematic depending on circumstance. I have never feared driving and I live in a rural area with a lot of deer and other animals. Winter or summer, heavy rain or sunshine, night or day, I always prefer and like to drive myself, and I drive constantly in my job. People die in accidents and they always will, that is a fact of life. Something like self-driving busses I can advocate for because they can be set to drive on static routes that always stay the same - i.e. those routes can be specially designed and maintained for them. I've already seen enough idiots doing random idiotic things with their Tesla autodrives that I would rather see them crash and burn because of their own stupidity instead of their "computer failing". I've also been a PC and tech enthusiast of over 25 years so I I'm fine with tech but I want to be the one who uses it, and decides how much of it I use. I also do not want it to make my hands, feet and brain obsolete. For me it's not really about if a computer can do it but about people not having to do things themselves (responsibly). I think that basic driving education should be done with a manual car and these "automatic only" cards should not exist (yes, I'm European and we drive a lot of manual cars, I even prefer them). If a person doesn't have enough coordination to manage a steering wheel, shitfer and pedals, how on Earth are they able to react to any unforseen situation on the road? And giving them autodrive doesn't make me feel any better if the person behind the wheel can't manage even basic driving themselves. One of the things I hate most in today's society (in general) is how pretty much everything that is considered even a bit dangerous is eliminated instead of educating people to assess risks and avoid problems themselves. Instead we make brains obsolete by building systems that do everything for us.
  • Recent Achievements

    • One Month Later
      KynanSEIT earned a badge
      One Month Later
    • One Month Later
      gowtham07 earned a badge
      One Month Later
    • Collaborator
      lethalman went up a rank
      Collaborator
    • Week One Done
      Wayne Robinson earned a badge
      Week One Done
    • One Month Later
      Karan Khanna earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      674
    2. 2
      ATLien_0
      274
    3. 3
      Michael Scrip
      219
    4. 4
      +FloatingFatMan
      170
    5. 5
      Steven P.
      161
  • Tell a friend

    Love Neowin? Tell a friend!