Announcement

Collapse
No announcement yet.

OK script guru's... who knows this one?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • OK script guru's... who knows this one?

    Before sweeping a pc for virus's I like to delete all temp files, etc I do this with a cleanup.bat with a few well know lines, such as:

    del "%userprofile%\Local Settings\Temporary Internet Files\*.*" /s /q

    Works a treat.. But only deletes the current users temp int files. Is there a way to clean all the profiles temp and temporary internet files. I tried..

    del "C:\documents and settings\*\Local Settings\Temporary Internet Files\*.*" /s /q

    But no joy..

    Would love to hear from ya.
    Thanks a bunch
    String
    Aus



  • #2
    For temp folder

    Code:
    FOR /D %I in ("C:\Documents and Settings\*") DO del "%I\Local Settings\Temp\*.*" /s /q
    For Temp internet files

    Code:
    FOR /D %I in ("C:\Documents and Settings\*") DO del "%I\Local Settings\Temporary Internet Files\*.*" /s /q
    And for logged on user temp internet files (for some reason the above doesn't work with the current logged on user.

    Code:
    del "%userprofile%\Local Settings\Temporary Internet Files\*.*" /s /q
    Remember if using in a batch file you need to use %%I instead of %I

    topper
    * Shamelessly mentioning "Don't forget to add reputation!"

    Comment


    • #3
      Topper.
      As we say in Australia.. You are a bl00dy legend cobber!.
      Thanks, that is sweeet.
      Have a good day..
      Best
      String

      Comment


      • #4
        Nice Script. Thanks

        Comment


        • #5
          we dont say that in australia.

          lies, all lies!

          Comment

          Working...
          X