The MASM Forum

Miscellaneous => The Orphanage => Topic started by: Magnum on February 12, 2014, 08:00:24 AM

Title: Stubborn directory to clear
Post by: Magnum on February 12, 2014, 08:00:24 AM
I am trying to write a batch file to delete all files in this directory.

Windows won't let me even when I remove all file attributes.

CCleaner can remove them, so it is possible.

Any ideas to try ?

Thanks.

C:\Documents and Settings\Andrew\Local Settings\Temporary Internet Files
Title: Re: Stubborn directory to clear
Post by: dedndave on February 12, 2014, 09:18:34 AM
many of the items that exist in the subfolders aren't really there   :biggrin:
some are "virtual" links - they only exist on your computer in the index file
to learn what is and isn't a file, you could figure out how to parse the index file (probably not that hard)
it may be simpler to just replace the index file with an empty one, then delete what's left

there are probably some issues with that
for example, some files in there may not belong to an internet explorer browser
so, i guess the trick would be to delete what you can, then make the index file match what is left
Title: Re: Stubborn directory to clear
Post by: dedndave on February 12, 2014, 10:50:07 AM
...also, the Favorites icons are stored in there - at least, for some versions of IE
Title: Re: Stubborn directory to clear
Post by: Blackmasm on March 27, 2014, 10:29:11 PM
Well:-
del *.*  /f /s /q
works for me
I think the /f is the important bit.
This will not delete files that are being used obviously, but you should get an error for such files telling you so.

Ccleaner probably using an api.
You could also take a look at running:-
RunDll32.exe Inet.cpl, ClearMyTracksByProcess 8
Which will depend on what version of IE you have installed

Cheers
Title: Re: Stubborn directory to clear
Post by: Vortex on March 28, 2014, 06:47:57 AM
Hi Magnum,

You can delete that folder after booting to a Windows PE session or a live Linux disc but Window will recreate the folder.
Title: Re: Stubborn directory to clear
Post by: Magnum on March 28, 2014, 09:35:45 AM
Thanks,

Andy