Safe to run a .bat file to clean Temp Internet Files at startup?

By SledgeProne
Apr 18, 2013
Post New Reply
  1. After defragging my HD today, I noticed on the completed defrag log, numerous fragmented files remained, including many from within my Content.IE5 folder.
    Rather than weed out each fragmented file, in a folder that itself is not easy to access,
    I found a .bat file that apparently cleans out this folder upon bootup, if placed in the startup folder.
    I'm just not certain if it was meant, and/or if its safe to use with my old Win XP.

    [USER=154672]Echo[/USER] off
    cleanmgr /sageset:99
    del /F /S /Q "%systemroot%\temp\*.*"
    del /F /S /Q "%systemroot%\Prefetch\*.*"
    del /F /S /Q "C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q "C:\Documents and Settings\Default User\Local Settings\Temp\*.*"
    del /F /S /Q "C:\Documents and Settings\Default User\Local Settings\History\*.*"
    del /F /S /Q "C:\Documents and Settings\%UserName%\Local Settings\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q "C:\Documents and Settings\%UserName%\Local Settings\Temp\*.*"
    del /F /S /Q "C:\Documents and Settings\%UserName%\Local Settings\History\*.*"
    del /F /S /Q "C:\Documents and Settings\%UserName%\Local Settings\Application Data\Temp\*.*"
    del /F /S /Q "C:\Documents and Settings\%UserName%\Local Settings\Application Data\Temporary Internet Files\Content.IE5
    del /F /S /Q "C:\AppData\Local\Microsoft\Windows\History\*. *"
    del /F /S /Q "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\*.*"
    del /F /S /Q "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Temporary Internet Files\Content.IE5\*.*"
    del /F /S /Q "C:\AppData\Local\Microsoft\Windows\Temporary Internet Files\Temporary Internet Files\Low\Content.IE5\*.*"
    del /F /S /Q "C:\Users\%UserName%\AppData\Local\Temp\*.*"
    del /F /S /Q "C:\Temp\*.*"
    del /F /S /Q "C:\Users\%UserName%\AppData\Local\Microsoft\W indo ws\Temporary Internet Files\Low\Content.IE5\*.*
    del /F /S /Q "C:\Users\%UserName%\AppData\Local\Microsoft\W indo ws\History\*.*
    ::Rem: No need to duplicate the following section for each registered User
    del /F /S /Q "%homepath%\Cookies\*.*"
    del /F /S /Q "%homepath%\recent\*.*"
    del /F /S /Q "%homepath%\Local Settings\cookies\*.*"
    del /F /S /Q "%homepath%\Local Settings\History\*.*"
    del /F /S /Q "%homepath%\Local Settings\Temp\*.*"
    del /F /S /Q "%homepath%\Local Settings\Temporary Internet Files\Content.IE5\*.*"
    cleanmgr /sagerun:99
  2. cliffordcooley

    cliffordcooley TS Guardian Fighter Posts: 8,050   +2,551

    Those listings are all safe to delete, regardless of whether it is done at bootup.

    However I do not know what this line is for.
    cleanmgr /sageset:99
    cleanmgr /sagerun:99
  3. jobeard

    jobeard TS Ambassador Posts: 8,945   +584

  4. SledgeProne

    SledgeProne TS Rookie Topic Starter Posts: 83

    Thanks guys!
    I remember reading an addendum from the poster, stating something about removing the sageset, after the first cleanup, after the preferences were set, that it was no longer necessary, but that it was also ok to leave as is.

    When I posted this last night, I had already placed the .bat file in the startup folder, and was awaiting a reply, before rebooting. Well I got sleepy, and inadvertantly turned off my machine. Upon startup, it cleaned up everything, and all does appear well, however it keeps prompting for preferences before scanning each time. Not sure exactly how to remove the sageset, but since it likely deleted the fragmented files, I suppose I can remove it altogether anyway.

Similar Topics

Create an account or login to comment

You need to be a member in order to leave a comment
TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...

Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.