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
You should now have a new Document on your Desktop that looks like this:
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:
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
5. Delete the document name and Type ClearHistory.cmd (or whatever you want to call it)
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
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.
30 Comments
Leave a Reply
Leave a Reply

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!
MrGroove
@Tony
Exactly! I’m glad you enjoyed the article!
Nayeem
Very usefull information…..
regards,
Nayeem N.S
Sanket Sirotiya
Thanks a Ton
cherry
oh no, this didn’t work for me! maybe i’m doing something wrong? ):
MrGroove
@Cherry – What exactly is not working? Please post your issue / question in our Forum – https://www.groovypost.com/forum/
Strider
Error in Inetcpl.cpl
Missing entry:ClearMyTracksByProcess
MrGroove
@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 ?
Saeed
Thank you.
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
akhilesh
Learning very much from Mr. Groove.
Thanks a Lot.
Otac
Great stuff and nice sharing. Its req for me.
Thanks
RobWPB
Thanks…
aamena
Thanks!
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!
Steve
@Luis – Dude…. your such a jerk! “Kidding” :)
You nailed it 100%! Not only can you configure IE to clear the cache each time you exit but you can also do it through the command line as well. I wrote up the Step-by-step the same time I wrote the article above.
https://www.groovypost.com/howto/microsoft/ie/automatically-clear-ie7-browser-temporary-files-at-exit/
LUIS
LOL!! thanks, i have saved those batch files anyways just in case i backed them up!! ;)
MrGroove
awesome!
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
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!
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.
MrGroove
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.
Tyger++
Thanks for the Share,did it 1 min,works perfectly.
Gopi
I am also facing same error.
error is error in Intelcpl.cpl
Missing entry Clear Mytracks by process
Judhisthira Sahoo
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
judhisahoo2009@gmail.com
shahid niazi
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
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
kember
This will work for win 7 4/2012, right?
zeeshan
anyone that can help me Batch file that will Clean Cache and Cookies memory Automatically every 5 minutes in Firefox browser @MrGroove