Index.dat Part III – How do I delete index.dat?


These data files are used by Internet Explorer and Windows Explorer.  You cannot delete a file that is in use by a running program.  If you feel you need to delete the file, you will have to shutdown all instances of Explorer and IE.  This includes applications that may host the Webbrowser control: Outlook, Messenger, IE, Product Studio, Visual Studio, Help, Windows Media Player, etc.  Your best bet is just close everything.  When you are left with a desktop and a start menu, you will still need to shutdown Explorer.  To cleanly shutdown Explorer: Start->Shutdown->CTRL+ALT+SHIFT+Click 'Cancel' (for more info, see this post).  You can use Task Manager (CTRL+SHIFT+ESC, File->Run...) at this point to open a command window.  You should be able to go delete the index.dat.  I have only tried this on XPSP2, but it should work anywhere.

Comments (15)

  1. Neyah says:

    Just curious… what would happen if you did this, deleted the index.dat files, then created them with an admin account and denied your normal logon account permission to use them?

  2. MSIMGSIZ.dat says:

    And what about this file:

    C:Dokumente und EinstellungenAdministratorLokale EinstellungenAnwendungsdatenMicrosoftInternet ExplorerMSIMGSIZ.DAT

    It would be cool if you could explain what this is used for!

  3. David Candy says:

    With TIF there is an option in the Clear the Cache dialog to clear Offline content too. What exactly is this meant to be – the offline content I mean. Does OE, which is one program that dumps stuff in TIF use the index.dat. What about partially downloaded pages.

    Clear Offline Content is the only thing that really clears the cache.

  4. David Candy says:

    Also there is a MS reccommended way but it’s involved (I did say an MS reccommended way)

    Move the TIF folder, Reboot, Move it back. Apparantly when moved it doesn’t bring it’s baggage with it. I did it once a few years ago. Or it may have been alter the reg, reboot to force a new folder.

  5. David Candy says:

    This doesn’t work (I was sure I had tried this years ago). Svchost still has the file open. It’s the LMHosts, Remote Reg, SSDP, and web client service host.

    C:Documents and SettingsDavid CandyLocal SettingsTemporary Internet FilesCo

    ntent.IE5>oh /t file index.dat

    //

    // TIME: 2004-11-26 20:11

    // MACHINE: SERENITY

    // BUILD: 2600

    // OH version: built by: dnsrv_dev(v-smgum)

    //

    //

    000003BC svchost.exe File 0164 Documents and SettingsLocalService

    Local SettingsTemporary Internet FilesContent.IE5index.dat

    000003BC svchost.exe File 0174 Documents and SettingsLocalService

    Cookiesindex.dat

    000003BC svchost.exe File 0180 Documents and SettingsLocalService

    Local SettingsHistoryHistory.IE5index.dat

    000002DC msmsgs.exe File 0448 Documents and SettingsDavid Candy

    Local SettingsTemporary Internet FilesContent.IE5index.dat

    000002DC msmsgs.exe File 0470 Documents and SettingsDavid Candy

    Cookiesindex.dat

    000002DC msmsgs.exe File 0478 Documents and SettingsDavid Candy

    Local SettingsHistoryHistory.IE5index.dat

    00000CA4 AcroRd32.exe File 00d4 Documents and SettingsDavid Candy

    Local SettingsTemporary Internet FilesContent.IE5index.dat

    00000CA4 AcroRd32.exe File 00f4 Documents and SettingsDavid Candy

    Cookiesindex.dat

    00000CA4 AcroRd32.exe File 00fc Documents and SettingsDavid Candy

    Local SettingsHistoryHistory.IE5index.dat

  6. jeffdav says:

    David–

    Yeah, it seems reasonable that some other guys might have a ref on these files. You can generally just kill them since you are going to blow the index.dat db away anyway. I use taskkill.exe and delnode.exe from the win32 sdk, which makes it much easier. My list of processes above is by no means complete and YMMV. The important thing is to shutdown everyone holding a ref.

    msmsgs.exe is Instant Messenger.

    AcroRd32.exe is Adobe’s Acrobat Reader software.

  7. jeffdav says:

    I am not familiar with MSIMGSIZ.DAT, but a quick search of the code reveals it to be the "Image Size Cache" used by MSHTML.DLL–the HTML rendering engine for IE. This is a completely different data store. It is accessed directly by MSHTML. It is not a WININET.DLL db.

  8. jeffdav says:

    Neyah–

    That may be one of those things you just have to try. My psychic powers are weak this morning (from all the wine I drank last week), but I would guess that all the API calls would fail with E_ACCESSDENIED. I would expect there to be no history and no link coloring and no autocomplete, et al…

  9. jeffdav says:

    David–

    Checking the "Clear offline content too" box in that dialog instructs IE to delete all the files in the cache, including ones that are marked as offline favorites. Things are marked as offline favorites when you select "Make available offline" in the AddToFavorites dialog box.

  10. David Candy says:

    It does more than just clear offline files. It clears all files. Assume I have no offline files (which I don’t).

    I have 1294 files (from 24 hours browsing – I defragged yesterday and cleared the cache). After clearing the cache without ticking the box I get 483 files. Of two types

    [<a number>] (eg [10]) which are extensionless 0 byte files. The other type is wbk<a three digit hex number>.tmp (eg wbk7A6.tmp) which has file sizes.

    Ticking the box and clearing the cache just gives me desktop.inis and dat files and this web page – total 8 files.

    BTW

    news:39E3938A-2189-452F-B0F9-D6208FD1A0A0@microsoft.com

    What would be a good size of the cache to reccommend.

Skip to main content