SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Computer Learning -- Ignore unavailable to you. Want to Upgrade?


To: mr.mark who wrote (11346)8/19/2000 4:57:57 PM
From: PMS Witch  Read Replies (1) | Respond to of 110653
 
deltree /y c:\windows\temp

Looks like you've discovered another potential 'gotcha' lurking in the hidden corners of Windows, ready to jump out and bite at the worst moment.

If only thing were easy --- Windows also sinks it's claws into certain files and any attempt to delete them fails. If Windows is running when you attempt to rid your system of temporary files, not all will be erased.

So --- Now we're in a pickle! Put the command in StartUp, and not all files get deleted, but put it in AUTOEXEC.BAT and some files get erased inappropriately.

I created a CLEANUP.BAT file that I only run in DOS. Since I run it, I have no worries about automation throwing grit into the gears, and since it runs in DOS, everything gets erased.

I'll cut-and-paste my CLEANUP.BAT file:

@ECHO OFF
REM Delete unwanted files and replace their root folders
DELTREE /Y C:\WINDOWS\TEMP
MD C:\WINDOWS\TEMP
DELTREE /Y C:\WINDOWS\COOKIES
MD C:\WINDOWS\COOKIES
DELTREE /Y C:\WINDOWS\TEMPOR~1
MD C:\WINDOWS\TEMPOR~1
ERASE E:\WIN386.SWP

Note: I use DOS 8.3 file names because I run this in DOS and Windows support for long file names is not available.

Anyway, your post points out a source of difficulty which would be extremely hard to locate for the average user. Imagine, everything's going well, and now, mysteriously, it doesn't. No signs. No messages. Just stopped. An 'Oh-shit' moment.

Cheers, PW.