Tip: Delete index.dat

March 8, 2008 – 3:16 PM

There are many, many programs for cleaning out temporary files and other junk that Windows lets build up on the hard drive. Sometimes though, you just want to do things like this yourself. It seems simple enough to open the temp folder and delete everything in it, until you actually go to do it. For whatever reason, Windows throws up a roadblock to people who want to delete their cookies and temporary internet files (also called browser cache).

Windows keeps a file called index.dat in memory the entire time it is running. Index.dat is located inside a hidden subdirectory of the Temporary Internet Files folder. You can delete every single file and folder around and underneath that file, but Windows refuses to allow you to delete index.dat itself. This is why most cleaner programs want you to reboot when you tell them to clean out the internet files. Those programs insert a start up entry that deletes the file before you log into your account.

In the past, people running Windows 95, 98 or ME could simply boot to MS-DOS and delete the file at the command line. Unfortunately, for Windows 2000 and XP, this is not an option. So how do you purge this stubborn file if Windows won’t let you touch it and there is no MS-DOS to boot into? There is a very simple way to do this that does not involve installing third party software or writing scripts to run at start up.

Basically, you have to create a new administrator account, then log into it. Since your normal account is not active, Windows is not able to lock you out of the index.dat file and everything can be deleted normally.

In Windows 2000, right-click the “My Computer” icon on the desktop. Highlight “manage” and click. The “Computer Management” console should pop up. Under “System Tools”, double-click the item called “Local Users and Groups”, then right-click on “Users”. Highlight “New User” and click. Set up a new user and click “Ok”.

After you’ve created the user, find the icon for them in the list and double-click it. Click the “Member Of” tab. Select “Administrators” in the list, then press “OK”. You’ve just given your new user administrative privileges, so make sure you gave it a password!

In XP, this is much simpler (although you can follow the same directions as for 2000 if you want). Open the Control Panel (usually listed on the Start Menu) and open the “User Accounts” applet. Click “Create User” and create your new account. Make sure to choose “Computer Administrator”.

Now, log out of your normal user account and log into the new account you just created. Find the Temporary Internet Files folder (c:|Documents and Settings|<your user name>|Local Settings), open it, press CTRL + A and then delete everything there. Don’t worry, Windows will recreate what it needs the next time you log in. This also works for the index.dat file located in the cookies folder.

Log out of the new account and back into your normal account. Windows will create a new, empty index.dat file that will be much smaller than the old one.


You must be logged in to post a comment.