Member Avatar for Member #127113

I hope every computer geek will know about index.dat file.

Well my point of view on Privacy that any anonymous hacker should know about you easily. You can clears the IE history, Cookies, Temporary Internet files...but till the URL's you have visited is located under index.dat file. Microsoft have designed that file to track the online surfing behaviour of user but its most vunerable for online Privacy.

Well no more solution to get rid of but i found a way to clears that URL's by Ccleaner, it cleanes it at next system restart.

Dani AI

Generated

Short primer and updated context — index.dat was the WinInet index file Internet Explorer used to record visited URLs, cookies and cache pointers; it stayed open while a user was logged on and so could be hard to remove with ordinary "clear history" actions, which caused the privacy fuss in the XP/IE era. IE7 and later changed how entries are handled and the classic index.dat behavior was phased out. (blogs.msdn.com)

What to look for today — modern Windows/IE no longer relies on per-folder index.dat files. Starting with IE10 the browser metadata moved into a single Extensible Storage Engine (ESE) database (WebCacheV01.dat and variants) under the user’s LocalAppData WebCache folder; Edge/legacy IE activity can also surface there. That means advice from the XP days (boot-to-DOS scripts, manual deltree) targets a different layout than current Windows. (swgde.org)

Practical privacy guidance — viewers and small utilities can read these artifacts (useful for understanding what’s stored), but viewing ≠ secure removal. Simple deletion or using the browser UI does not guarantee unrecoverability; for true sanitization follow established media-sanitization guidance (overwrite or cryptographic erase where supported) rather than ad-hoc file deletion. For policy-grade or disposal needs use the procedures in NIST SP 800-88. (nist.gov)

Notes on the thread replies — ’s pointer to an index.dat scanner is useful for inspection; and ’s boot/delete approach and ’s kill‑Explorer technique reflect common historical workarounds to locked files but are fragile and can corrupt profiles or miss modern WebCache stores. Safer workflow: image the drive, analyze the image offline with ESE/EDB-capable tools (for example, forensic toolkits that support WebCache ESE), then apply verified sanitization methods if required. (plaso.readthedocs.io)

Recommended Answers

All 5 Replies

Indexdat scanner is a good utility which lets you see what it holds.

I usually boot to DOS and delete those files manually.

after booting to dos, how and where would you delete these files from? Sorry for basic quetions, very noob to this.

Boot to dos and type this

cd windows

deltree /y cookies
deltree /y history
deltree /y tempor~1

and if you want you can delete your swap file by typing


Welcome to the site!

C# code to delete the Index.dat file shown below

it's very hit and miss which seems to be a timing isue but the deal is you need to set the attributes on the 'Special Folder' and the file before you try to delete it and thats after you have killed explorer that locks the files.

MS is doing all it can to stay freinds with the CIA!

        int DeletedCount = 0;
        int CouldNotDelete = 0;
        KillExplorer();
        foreach (string DatFile in DatFiles)
        {//Do not put break point or step into the code else explorer will start and the file will become locked again
            DirectoryInfo DInfo=new DirectoryInfo(DatFile.Replace("index.dat",""));
            FileAttributes OldDirAttrib = DInfo.Attributes;
            DInfo.Attributes  = FileAttributes.Normal;//Set to normal else can not delete
            FileInfo FInfo = new FileInfo(DatFile);
            FileAttributes OldFileAttrib = FInfo.Attributes;
            SetAttr(FInfo, FileAttributes.Normal);
            TryDelete(FInfo);
            SetAttr(FInfo, OldFileAttrib);//Sets back to Hidden,system,directory,notcontentindexed
            if (File.Exists(DatFile))
                CouldNotDelete++;
            else
                DeletedCount++;

        }
        if (DatFiles.Count>0)//Lets get explorer running again
            System.Diagnostics.Process.Start(DatFiles[DatFiles.Count - 1].Replace("index.dat", ""));
        else
            System.Diagnostics.Process.Start("explorer");
        System.Windows.Forms.MessageBox.Show("Deleted " + DeletedCount + " Index.dat files with " + CouldNotDelete + " Errors");


        return "Deleted " + DeleteFileCount + " Files ";
    }

    private void KillExplorer()
    {
        foreach (Process P in Process.GetProcesses())
        {//Kill both these process because these are the ones locking the files
            if (P.ProcessName.ToLower() == "explorer")
                P.Kill();
            if (P.ProcessName.ToLower() == "iexplore")
                P.Kill();
        }
    }

    private bool TryDelete(FileInfo Info)
    {
        try
        {
            Info.Delete();
            return true;
        }
        catch 
        {return false;}
    }

    private void SetAttr(FileInfo Info,FileAttributes Attr)
    {
        try
        {
            Info.Attributes = Attr;
        }
        catch { }
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.