A technique to get rid of index.dat filesS.Rodriguez - July 31, 2004
Disclaimer : the technique explained in this article is given as is and confers no rights. If this damages your install, that's too bad, but blame yourself for it.
Unlike alternative solutions that can be found on the net, click here for google results, this technique does not require the reboot of your computer.
Internet Explorer uses a dictionary of urls to keep track of everyone's surfing habits. This dictionary is however not deleted when you go in the Internet Explorer options, and delete your temporary internet files or cookies, regardless your caching options. In fact, index.dat is never deleted by any mean, and grows since you last reformated your system! In practice, it's quite probable that the current index.dat file you are using aggregates the collection of url of every single website you visited since you bought your computer! Freaky, right?
To be more accurate, there is not one index.dat file, but more. One is more related to cookies, another is more related to page cache, and the last is related to your history. So there are 3 instances to deal with. And there are such 3 instances for every account in the system. As you can see, the numbers can grow very fast. The point however is that Internet Explorer uses a combination of registry keys to know where to find the index.dat files, and then depending on what it's doing will read/write one or another. To get rid of index.dat files, we need to get rid of all of them, not just one.
Last but not least, those index.dat files are loaded by several processes whenever Windows starts. Typical processes include : Windows explorer itself (explorer.exe), a local process with no particular identifier started by svchost.exe. And on top of that every single Internet Explorer related app will load and lock those files as well including : Internet Explorer itself (iexplore.exe), and all applications hosting the web browser control (google deskbar for instance).
Fortunately, there is a way to identify those apps so that index.dat files can eventually be unlocked. This preliminary step is required before wen can delete the files.
Deleting the files is one thing, it makes a raw clean up. But it has to be said that every single process mentioned above will then create new index.dat file going forward. If you are interested in the clean up, that's a good thing to do. But wait there is more to it, as you'll read below : we can get rid of the info gathering revolving around index.dat files as simple as stated.
Steps to reproduce
Simple clean up or more
Unzip the package
The content of the package
The package is made of the following :
Identify the applications which lock index.dat files
Open up a command-line prompt by typing
Type handle.exe index.dat, you should get a result looking like the following :
Identifying applications which lock index.dat files
Although this looks a bit tough to read, the listing produced by the
Half of those lines are only synchronization objects related to index.dat files, not files per se, so skip them. They have "\BaseNamedObjects\..." instead of a filepath.
In the screen capture above, actually only 3 processes are of note :
Of course, your computer will show a different combination of processes, but this doesn't change anything. The point is to kill all processes except explorer.exe.
Killing all processes except explorer.exe
Killing all processes unlocks index.dat files. Since killing
To kill a process, you need to type
All in all, the resulting output of handle should now look like the following :
All applications locking index.dat files are killed, except explorer
Launching the script
It's about time to start the script. The script will do the following :
To launch the script, type
The code for the script is the following :
pushd . kill.exe -f explorer.exe c: cd \ del /s index.dat popd newindexdat.exe explorer.exe
The screenshot below shows what appears on screen while the script executes :
Running the script
Done! well almost
You can now safely quit the command-line prompt. There is no need to reboot the machine, the index.dat files have been deleted.
If you didn't remove the
To get back to a normal configuration, you can right-click the index.dat file from your Internet Explorer temporary folder, then remove the read-only protection, then edit the script above and remove the
That's all folks.