Unique Touch Posted February 1, 2004 Share Posted February 1, 2004 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 Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/ Share on other sites More sharing options...
mldkfa Posted February 2, 2004 Share Posted February 2, 2004 Wouldn't be too hard to do yourself. just open them all up and remove it yourself, there are cleaners out there though, can't remember the name, will post if I can. Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1681337 Share on other sites More sharing options...
Unique Touch Posted February 2, 2004 Author Share Posted February 2, 2004 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 Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1682285 Share on other sites More sharing options...
Unique Touch Posted February 2, 2004 Author Share Posted February 2, 2004 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... Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1684746 Share on other sites More sharing options...
John Veteran Posted February 2, 2004 Veteran Share Posted February 2, 2004 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... Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1684901 Share on other sites More sharing options...
Unique Touch Posted February 3, 2004 Author Share Posted February 3, 2004 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 Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1686540 Share on other sites More sharing options...
hurting101 Posted February 3, 2004 Share Posted February 3, 2004 for /f "tokens=*" %%* in (' dir/b/a:d-h "%userprofile%\..\" ') do ( :: (commands here) ) Insert the commands where indicated, using "%%*" as the username, such as: rd "%userprofile%\..\%%*\Local Settings ..." Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1687270 Share on other sites More sharing options...
Unique Touch Posted February 3, 2004 Author Share Posted February 3, 2004 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 Link to comment https://www.neowin.net/forum/topic/137317-deleting-xp-multiple-users-temp-internet-files/#findComment-1688515 Share on other sites More sharing options...
Recommended Posts