Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

batch file to delete internet explorer history and cookies

Posted on 2009-05-13
7
Medium Priority
?
605 Views
Last Modified: 2012-05-06
I'm looking for a .bat file that I can run to delete cookies and history in IE.
0
Comment
Question by:JPERKS1985
7 Comments
 
LVL 16

Expert Comment

by:glenn_1984
ID: 24379869
0
 
LVL 4

Expert Comment

by:delyan_valchev
ID: 24379887
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 50

Expert Comment

by:jcimarron
ID: 24380465
JPERKS1985--You will also want to clear the index.dat file from Content.IE5.  Even though you clear Temporary Internet Files and HIstory, the History still exists in that index.dat file.
This is not as easy to do using a batch file as are the others.
See http://www.onecomputerguy.com/ie_tips.htm and scroll to Misc|Clearing index.dat.
There are lots of software programs to do this.  I use System Security Suite.
http://www.igorshpak.net/
0
 
LVL 11

Expert Comment

by:NaturaTek
ID: 24383011
There are numerous app out there to help do the job. My favorite being free is CCleaner. www.ccleaner.com

If you want a batch file, copy the following into notepad and save it as cleanup.bat or anythingyouwant.bat
del /S /Q c:\WINDOWS\Temp
cd\\
cd C:\Documents and Settings\yourusernameHere\Local Settings\
rmdir /S/Q Temp
del /Q Temporary Internet Files
echo Deleting Files
echo Files Deleted
mkdir Temp
exit

Open in new window

0
 
LVL 4

Expert Comment

by:delyan_valchev
ID: 24383027
Again I would refer to http://www.howtogeek.com/howto/windows/clear-ie7-browsing-history-from-the-command-line/
Delete all IE history in one line:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Open in new window

0
 
LVL 11

Accepted Solution

by:
NaturaTek earned 2000 total points
ID: 24383054
Let me correct this..you wanted history cleared for sure, I added this and the correct syntax for cd, I used one \ too many, The correct code is here below, enjoy. Close internet explorer when running batch to free any locked file.
del /S /Q c:\WINDOWS\Temp
cd \
cd C:\Documents and Settings\yourusernameHere\Local Settings\
rmdir /S/Q Temp
del /Q Temporary Internet Files
attrib -h -s history
del /q history
attrib +s +h history
echo Deleting Files
echo Files Deleted
mkdir Temp
exit

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question