Internet Explorer

Create a Batch File to Delete IE7 Browser History and Temp Files

This article will be my last article that focuses on Deleting the Internet Explorer 7 (IE7) Temporary Files, Cookies, Browser History, etc.  In my previous 2 Articles, I talked about How-To Clear the Browser History files manually and via CMD line.  However, if you need help doing this via a Batch File, read on.  The below Step-by-Step Tutorial should be simple to follow.  I’ll be using a Windows Vista machine for the Tutorial and Screen Shots, but the process is pretty much the same for Windows XP and other Windows Operating Systems.

How to Create a Batch File to Delete IE7 Browser History and Temp Files

1.   Right Click on your Desktop and Click New, Text Document

Image of Creating a new Text Document in Windows Vista

You should now have a new Document on your Desktop that looks like this:

Create a Batch File to Delete IE7 Browser History and Temp Files

3.   Double Click the Document to open it.  Type or Paste the following text into the empty document

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

It should now look like this:

Create a Batch File to Delete IE7 Browser History and Temp Files

3a.   Click File, Save then Close the Document

Ok, now it’s time to convert the document into a Batch file.  It’s a simple process of changing the file extension to a .cmd file.

4.   Right Click on the Document and Click Rename

How-To Rename a file in Windows Vista :: groovyPost.com

5.   Delete the document name and Type ClearHistory.cmd (or whatever you want to call it)

Create a Batch File to Delete IE7 Browser History and Temp Files  After Rename – Create a Batch File to Delete IE7 Browser History and Temp Files

 

You’re Done!  To test it out, just Double Click the File, and you should see an Internet Explorer 7 box open telling you it’s Deleting Temporary Internet Files

Create a Batch File to Delete IE7 Browser History and Temp Files

If you’re REALLY paranoid, you can setup a Windows Task to run your new Batch file every 15 or 30 Minutes.  Personally, I only clear my Browsing History and Temp files to get rid of clutter on my Hard Drive.

 


29 Comments

29 Comments

  1. Tony  

    This is awesome! Just created the batch file and my history is being nuked every 90 minutes! 🙂
    Just because i’m paranoid doesnt mean they aren’t out to get me!

  2. @Tony

    Exactly! I’m glad you enjoyed the article!

  3. Nayeem  

    Very usefull information…..

    regards,

    Nayeem N.S

  4. Sanket Sirotiya  

    Thanks a Ton

  5. cherry  

    oh no, this didn’t work for me! maybe i’m doing something wrong? ):

  6. @Cherry – What exactly is not working? Please post your issue / question in our Forum – https://www.groovypost.com/forum/

  7. Strider  

    Error in Inetcpl.cpl
    Missing entry:ClearMyTracksByProcess

  8. @Strider

    I take it that was your error message box that popped up when you ran the command.

    What version of windows are you running and what version of IE ?

  9. Thank you.

  10. samrat  

    even i am getting the same problem it is giving an error saying that

    Error in Inetcpl.cpl
    Missing entry:ClearMyTracksByProcess

    using windows Xp service pack – 2

  11. akhilesh  

    Learning very much from Mr. Groove.
    Thanks a Lot.

  12. Otac  

    Great stuff and nice sharing. Its req for me.
    Thanks

  13. RobWPB  

    Thanks…

  14. aamena  

    Thanks!

  15. LUIS  

    This is a good way to create a batch file deleting IE history, cookies etc.. There is a lot easier way to do this not trying to sound like a complete douche-bag but there is a setting in the advance tab. Of IE properties there is an option that “empty your temp files when you exit IE” its a similar to it. every time you exit IE your browser history and cookies get automatically erased permanently. IE might start slow every time though thats the issue because it does not save anything really!

  16. lax  

    may be nice but it didn’t work here plz tell me whats it’s solution
    error is error in Intelcpl.cpl
    Missing entry Clear Mytracks by process

  17. SSG L  

    Thanks you, this was very helpful!

    We have Windows XP here at work and although it didn’t work when I saved it as a “.cmd” dile, it DID however work when I saved it as a “.bat” file…

    Nice work!

  18. larry  

    uh oh i cant get it to save my txt file as a cmd file – when i click rename and type in xxx.cmd i end up with a file called xxx.cmd.txt, so then when i try and execute the file it just opens the file.

    thanks in advance for help with this. i am running windows XP serv pack 3.

    • Hi Larry,

      Simple fix. You need to first enable Windows XP to allow you to see file extensions. This way you can easily rename the file to xxx.cmd rather than xx.cmd.txt file which is what is happening to you now.

      I just created the Step-by-Step for you here that reviews How-To Configure XP to show file extensions. And just for reference, here is the same step-by-step for Windows 7.

      • Larry  

        thanks for the prompt and extremely helpful advice, MrGroove, it works perfectly now.

  19. Tyger++  

    Thanks for the Share,did it 1 min,works perfectly.

  20. Gopi  

    I am also facing same error.
    error is error in Intelcpl.cpl
    Missing entry Clear Mytracks by process

  21. Hi Steve,

    its really great and useful.

    But i need one more..how delete the temporary file for firefox.
    if you have the idea plz post that here or by my mail.

    thnaks,
    Judhisthira sahoo
    [email protected]

  22. its a usefull thing but sir i need a batch file for deleting temp and %temp% files so plz give me batch file for the same

    plz reply

  23. YeaYeaYeas  

    been working perfectly for the past 9 months; even still after the mass reimage they performed on everyone’s pc here @ work. Your batch file STILL WORKS! Thank you thank you!

    ~Kia

  24. kember  

    This will work for win 7 4/2012, right?

Leave a Reply

Your email address will not be published. Required fields are marked *

 

To Top