Batch file to cleanup temporary internet files found in profile directories

pts.
Tags:
Active Directory
DataCenter
Windows 2000 desktop
Windows 2000 Server
This is really an FYI. I just posted a batch script that you can use to delete temporary internet files from the profile directories of users with roaming profiles. You can check it out here: http://frankenrouter.homeip.net/System+Admin+Articles/109.aspx Let me know what you think.

Answer Wiki

Thanks. We'll let you know when a new response is added.

I very much appreciate the script. but could u post a practical example of the following statement in regards to a normally setup WinXP : “you need to set the two variables, HDRIVE and HPATH, to point to the location where your directories are located.” Do we need to set a home path for each and every user? can we use %userprofile% as HPATH? Also “”%HDRIVE%%HPATH%%1ProfileLocal SettingsTemporary Internet FilesContent.IE5″ do we leave the %1? would a WinXP default look exactly like this in the script: C:Documents and Settings%1ProfileLocal SettingsTemporary Internet FilesContent.IE5″?
Thanks in Advance
JAF

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Ghigbee
    You point it at the location where all user profiles are stored and it will scan all the directories. For example, lets say you have 10 people who share a windows xp computer. Each person has a profile directory located under the "c:documents and settings" folder. You would set HDRIVE=c: and set HPATH="documents and settings". Also know that I updated the script because my profiles were stored in a directory called "profile" and you normally wouldn't need it. So if you check out the script again you will see a slight difference in the file paths.
    0 pointsBadges:
    report
  • ELPUEBLO
    Thank you the Update. I used the script and it work great. Can one do the same thing to Cookies by replacing "if exist "%HDRIVE%%HPATH%%1Local SettingsTemporary Internet FilesContent.IE5" call :ContentDelete1 %1 if exist "%HDRIVE%%HPATH%%1windowsTemporary Internet FilesContent.IE5" call :ContentDelete2 %1" With "cookies" in the place of "local settings (windows)temporary internet filescontect.ie5"
    0 pointsBadges:
    report
  • Ghigbee
    That should work. I would recommend trying it on a test machine before turning it loose in production. Those batch file loops can be dangerous, especially when they are designed to delete files.
    0 pointsBadges:
    report
  • Ghigbee
    This is an update. The original site went down due to a lightning hit and I had to recover the data and get the site hosted. So, the batch file is now available at http://www.greatnorthcomputing.com/System+Admin+Articles/109.aspx Thanks, Gary
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following