<> said this in news item
news:8b992674-84c0-4891-a47c-...
> On Feb 2, 1:49 pm, "Pegasus [MVP]" <n...@microsoft.com> wrote:
>> <pheoni...@gmail.com> said this in news
>> itemnews:38cbf113-6072-4cb1-9d68-...
>>
>>
>>
>> > hello,
>> > I've been searching for a way to delete user junk files like it states
>> > in subject box.
>> > Setting IE settings to clear temp files when the browser is closed
>> > does NOT work.
>> > Making disk space 0 for temp files also leaves plenty of junk files
>> > behind.
>>
>> > The only way I have seen to clear the files is manually.
>>
>> > I've found this script to erase the junk files. It works by putting
>> > it in the all users folder in startup.
>>
>> > c:
>> > cd\
>> > cd C:\Documents and Settings\%username%\Local Settings\Temporary
>> > Internet Files
>> > del *.* /f/s/q
>> > cd \
>> > cd c:\Documents and Settings\%username%\Local Settings\Temp
>> > del *.* /f/s/q
>> > exit
>>
>> > What is a good way to make this work via login (or logout) scripts via
>> > active directory?
>>
>> > Thank you,
>>
>> > Oskar
>>
>> The above script is higly dangerous. If the second command (the "cd"
>> command) fails for some reason (and there are several reasons why it
>> might
>> fail!) then you are likely to cause permanent damage to your machine or
>> delete all your data files. Use this version instead:
>> @echo off
>> del /s /q /f "%UserProfile%\Local Settings\Temporary Internet
>> Files\Content.ie5\*.*"
>> del /s /q /f "%temp%\*.*"
>
>
> That's awesome! I'll try this.
> Thank you 
>
> Oskar
Thanks for the feedback. I would not call this "awesome" - it's just using
standard batch file techniques with an eye to making them robust. "Robust"
means: Never assume anything in batch files.