First off why are you attempting to delete temporary Internet files manually? Internet Explorer has built in tools to make this easy. Windows XP has disk cleanup which also makes removing Temporary files easy.
Should those two methods not suit you, I'd recommend this free utility http://www.ccleaner.com/
Simply pick what you want, and it will do the rest.
The reason you receive "Cannot delete file" is the index.dat file is always in "use" by Internet Explorer and can only be deleted on reboot.