TechSpot

Batch file to delete Internet temp folder content?

By TechFee
Jul 10, 2012
Post New Reply
  1. *XP Pro 32 bit Machines * IE7/8

    Hello,

    I am trying to create a batch file to delete all contents in

    C:\Documents and Settings\$user profile$\Temporary Internet Files

    I’ve noticed with IE8 that when you click the Delete option under Browsing History in the Internet Options its failing to clean out the Temp file.

    I like to write small batch files for my customers to save time/fix problematic proprietary software that we use. I entered the line,

    "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255"

    in my last batch file to run the delete browsing history and temp files utility but its not clearing the temp file.. I think this is an IE8 issue.. I was just wondering if I could enter like a deltree command or something.. Just can’t figure out how to delete the temp files for the local user.. Wondering if there is a wildcard or something to delete the currently logged in users Temp file.

    Also I was wondering if there is a code I can write in a batch that will delete damaged Active X objects?

    I’m a tech and my DOS skills are a little rusty. Any help would be great!! -SGF
     
  2. ravisunny2

    ravisunny2 TS Ambassador Posts: 1,971   +10

  3. TechFee

    TechFee TS Rookie Topic Starter Posts: 27

    I know about CCleaner… That’s not what Im trying to do.. Im trying to write this in a batch file…less steps..
     
  4. ravisunny2

    ravisunny2 TS Ambassador Posts: 1,971   +10

    Sorry, TechFee.

    BTW, CCleaner does lend itself to some automation.

    CCleaner.exe /AUTO
    CCleaner runs silently and automatically, using the current set of saved options to clean the PC. CCleaner then exits.

    CCleaner.exe /AUTO /SHUTDOWN
    CCleaner runs silently and automatically, using the current set of saved options to clean the PC. Windows then shuts down automatically..

    http://www.piriform.com/docs/ccleaner/advanced-usage/command-line-parameters
     

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...