I’m trying to find a way with a batch file that will delete specific contents of a folder. The folder is the temporary internet files folder, ‘Content.IE5’
The problem is that I need to leave the 2 files in that folder called: ‘desktop.ini’ and ‘index.dat’, but delete the folders that are created in there by Internet Explorer – they have changing names of the folders too.
Does anyone know how this could be achieved?
Thanks.
Have you considered calling
This seems to be one way to clean up the Temporary Internet Files from the command line, and it can also do several other things. Running the Disk Cleanup Tool is also an option. You can create a group of things that you want to clean up with
cleanmgr /sageset:[n], and then callcleanmgr /sagerun:[n].These aren’t as fun as writing your own batch file to delete them, but they will probably accomplish your goal with less work.