I’m the AutoCAD IT guy at work, because our windows IT guys always facebooking and e-baying my manager has complained he’s temp folders are too full. Because I’m always researching and listing (and want that promotion) I”ve put up my hand to help my own pocket oops I meant to say great boss.
Batch is not my home front so I have run into two problems #1:
I want to delete all the temporary internet files except the cookies otherwise he’ll whinge he cant remember all his 101 usernames and passwords he keeps stored in with them everything else can go.
Secondly I’m having trouble with my /y apparently my batch says its not a valid option
Here’s my code:
@echo off
echo Now Deleting contents of temp folder...
del /y "%userprofile%\Local Settings\TEMP\*.*"
echo Now Deleting contents of temporary internet folder...
del /y "%userprofile%\Local Settings\Temporary Internet Files\*.*"
The /Y switch does not exist in DEL command. If you want to delete files with no confirmation, the switch is /Q. Anyway, you don´t need it if you use the following method.
I don´t know what the extension of cookies files is, but suppose that is COK. The following method deletes all temporary files excepting those with .COK extension:
Type FOR /? for further details.
I hope it helps.
Antonio