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: 2,057   +8

  3. TechFee

    TechFee Newcomer, in training Topic Starter Posts: 29

    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: 2,057   +8

    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


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