Quite unfortunately, you cant erase those files when they are in use. And Windows pretty much always keeps them in use (poor design).
You can erase them if you boot into a command prompt in Win9x. I think you can do that in WinNT/2000/XP as well, but Im not 100% sure.
There is also a trick in Win9x to be able to delete/erase them without rebooting. It involves an undocumented way to close the Explorer shell. If I recall, you hold down a Shift key while selecting the shut down option on the Start Menu. You then cancel the shutdown, keeping Shift depressed. The shell then shuts down, while keeping the windows operating system running. You can then issue commands to erase files using the command-line version of eraser (including index.dat). Finally, you can reload the shell. Its a great trick, and works consistently.
I dont know if a similar trick is available in WinNT/2000/XP. Maybe someone else does?
It would be truly amazing if eraser could be enhanced to erase files like index.dat just like any other file. But I cant think of any way it can be done without introducing possible corruption. After all, if the files are "in use", they are in use by a process that is doing something with them. And unless that process is fully understood, altering the contents of the in-use file could really mess things up. [:0]