Click to See Complete Forum and Search --> : deleting tmp files in W95.
Hi,
I read that Win95 would normally delete temp files at reboot. I have check tmp files on my computer and reboot to see if there were gone, but there were still there. I think its to autoexec.bat that take care of that but mine is empty? HOw can I fix this so at reboot it will delete all temp files from the temp directory?
Thanks
George.
Bill Kunert
06-08-1999, 03:19 PM
I believe the only temp files windows deletes on reboot are those in the Windows\temp directory and it doesn't always delete all of those. I periodically clear out the win\temp directory manually after a reboot.
Bill
[This message has been edited by Bill Kunert (edited 06-08-99).]
Susan
06-08-1999, 03:39 PM
And it doesn't hurt to delete all those Temporary Internet files if your an IE user. They build up fast.
Thanks you guys for the quick response.
But i got 400 users I need to tell them that everytime it builds up. Is there a way in autoexe.bat we can add a line that will automaticly delete them all or most of them at boot??
do_g@hotmail.com
cobain1crt
06-08-1999, 08:28 PM
alright, put this in the begining of your autoexec.bat file:
@echo off
c:\
cd c:\
if exist temp goto c
:d
cd windows
cd temp
del *.a*
del *.b*
del *.c*
del *.d*
del *.e*
cls
del *.f*
del *.g*
del *.h*
del *.i*
del *.j*
cls
del *.k*
del *.l*
del *.m*
del *.n*
del *.o*
cls
del *.p*
del *.q*
del *.r*
del *.s*
del *.t*
cls
del *.u*
del *.v*
del *.w*
cls
del *.x*
del *.y*
del *.z*
cls
goto end
:c
cd c:\
cd temp
del *.a*
del *.b*
del *.c*
del *.d*
del *.e*
cls
del *.f*
del *.g*
del *.h*
del *.i*
del *.j*
cls
del *.k*
del *.l*
del *.m*
del *.n*
del *.o*
cls
del *.p*
del *.q*
del *.r*
del *.s*
del *.t*
cls
del *.u*
del *.v*
del *.w*
cls
del *.x*
del *.y*
del *.z*
cd c:\
goto d
cls
:end
[This message has been edited by cobain1crt (edited 06-08-99).]
[This message has been edited by cobain1crt (edited 06-08-99).]
MadMax
06-08-1999, 08:56 PM
Nobrain1crt~What's wrong with *.*?
I really hope that's a joke.
autoexec.bat:
del X:\temp\*.* (and/or *.tmp) will kill your temp files.
Repeat for all temp directories. There are other ways to do this but this way is free, simple and quick.
400 users, huh? You should brush up on your DOS. Happy tapping. http://www.sysopt.com/forum/wink.gif
[This message has been edited by MadMax (edited 06-08-99).]
[This message has been edited by MadMax (edited 06-08-99).]
cobain1crt
06-08-1999, 09:03 PM
Del *.* asks you something like "are you sure?", this is not a joak, this is what it takes.
Hi,
Well that's what i wanted.
I work at a helpdesk for a gov. department.
I 'am late commer to computer stuff.
I remember a setting in autoexec.bat to delete those tmp file. But I just couldnt remember and this place make is faster and easier for me.
Again, thank you very much for your help.
George.
cobain1crt, dos only prompts you like that when you ask it to delete a whole directory, not just the individual files within it. For example, "del c:\temp" would give the prompt asking if you're sure about deleting the contents of that directory. "del c:\temp\*.*" should work just fine, without any annoying prompts.
MadMax
06-08-1999, 11:14 PM
I wrote an inappropriate response to the goof and I took it down.
[This message has been edited by MadMax (edited 06-08-99).]
MadMax
06-09-1999, 12:17 AM
OK, now I will answer without sarcasm:
If you don't want prompts (which aren't necessarily a bad thing), use this:
autoexec.bat:
deltree /y x:\temp
md x:\temp
Repeat the "deltree" line for all temp dirs and the "md" line only for temp dirs that win doesn't recreate automatically.
[This message has been edited by MadMax (edited 06-09-99).]
Bleeding Edge
06-09-1999, 12:24 AM
I like this answer MadMax. It suits you much better. http://www.sysopt.com/forum/wink.gif
hsuia
06-09-1999, 12:53 AM
If instead of deltree /y x:\temp
the command is deltree /y x:\temp\
the directory is emptied but it is not deleted.
Also, if a temp directory is not found upon reboot doesn't Win95 rebuild one?
Hope this helps
hsuia
steves
06-09-1999, 05:17 AM
cobain1crt~Possible fatal flaw in your autoexec - if c:\windows\temp does not exist (unlikely I admit - but it could have been moved to another drive) the contents of the windows directory get deleted.
Eli~*.* prompts in all cases (on my system at least) - however
del c:\windows\temp\*.?
del c:\windows\temp\*.??
del c:\windows\temp\*.???
or the deltree solution proposed by MadMax/hsiua is much faster than cobain1crt's bloatware (he should get a job with the evil empire).
MadMax
06-09-1999, 07:24 AM
hsuia~Hey I guess I need to brush up on my dos. LOL. That's a much cleaner/better command than mine. Windows will restore the default temps but there may be others in kgbs configs. That's why I mentioned restoring dirs.
steves~That flaw is, along with the other problem syntax in that code of cobain1crts, is what I had a serious problem with. There's nothing like telling someone to cut their own throat.
a Bill
06-09-1999, 08:51 AM
Do you guys mean that this deltree /y x:\temp\ replaces all of what cobain wrote?
MadMax
06-09-1999, 10:54 AM
a bill~Yes. Also, cobain1crts code only deletes files with extentions that start with a letter. "Deltree /y x:\temp\" kills ALL files in the target dir.
a Bill
06-09-1999, 02:56 PM
Wow, that's quite a reduction. The bloatware comment makes much more sense now http://www.sysopt.com/forum/smile.gif
Thank you for taking the time to respond, MadMax.
MAGIC 8-BALL and THE ELF
06-09-1999, 03:07 PM
Once again, for the umpteenth time, cobain1crt has shot himself in the foot. How ever will he regain credibility? - 8-Ball
He was only trying to help. Now he needs help trying to walk. - Elf
cobain1crt
06-09-1999, 03:52 PM
Thanks for the info, I assumed there was a switch, but I copied by autoexec.bat file right onto that post of mine. Also, if c:\windows\temp does not exist, no error is posted. And by the way, unlike Microsoft, my stuff never crashes a computer.
wow. thanks for all your reply.
All wanted was that line in autoexec.bat file to delete those files that some take place on the hard drive.
steves
06-10-1999, 10:12 AM
cobain1crt~I'd be very nervous about having an autoexec that had the potential to delete the entire windows directory if the windows\temp directory doesn't exist.
Personally I'd have to add an 'if not exist' line (or use absolute paths).
SysOpt.com
Copyright Internet.com Inc. All Rights Reserved.