1. TechSpot is dedicated to computer enthusiasts and power users. Ask a question and give support. Join the community here.
    TechSpot is dedicated to computer enthusiasts and power users.
    Ask a question and give support.
    Join the community here, it only takes a minute.
    Dismiss Notice

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: 9,169   +3,261

    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: 10,432   +801

  4. SledgeProne

    SledgeProne TS Enthusiast Topic Starter Posts: 91

    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

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...