Solved

clean out windows\temp??

Posted on 2000-03-05
9
238 Views
Last Modified: 2013-12-28
My question  is what, (if anything) to do with my apparently bloated windows\temp folder. Win98 occasionally "hangs" or "freezes" on me. Once or twice a week - no big deal. I've heard and read that
housecleaning the windows\temp folder tends to improve stability. Even read recently that all files dated earlier than *today* s/b deleted. Here's a description of the contents of my temp folder: 37 MB, 19 subfolders, many of which are empty, some of which contain folders, and most of which have obscure names. Also about 200 files of various types: exe's, jpg's, htm's, doc's, etc. I recognize some of these as copies of files I have elsewhere (or have deleted), and some are totally unrecognizable. Many of the files have  .tmp extension and are 22kb in size; some .tmp's are 0kb.

Obviously, I could look at each file and decide what to do, but I don't have a month to spare ;-). Another alternative is to back up the entire 37MB and delete the entire contents; this frightens me. Or I could just ignore it - I don't presently need the 37 MB of disk space.

Expert recommendation, please?
0
Comment
Question by:EvilEye24
9 Comments
 
LVL 2

Expert Comment

by:EDStech
ID: 2585385
Speaking for myself, what I do is reboot the pc and then just do START - RUN 'C:\windows\temp' Select and delete everything.  If its important it'll get recreated.  Rebooting ensures you won't lose any data.
0
 
LVL 13

Expert Comment

by:oldgreyguy
ID: 2585459
I have pulled back on the stick a little over the last couple of reinterations of Windows. Some programs will put little bits of uninstall information in the Temp directory, so now I just take a little bit of time once a month, and open the temp directory, then go up to TOOLS/FIND/FILES & FOLDERS, and enter *.TMP, enter, then delete these. If it is filling up with Gifs, Htms I wonder if you have directed your Temporary Internet Files to this folder. If so, I would redirect them to another folder, then you can just delete the Temporary Internet contents without possible loosing some uninstall info

bill
0
 
LVL 15

Expert Comment

by:hewittg
ID: 2585482
Evil,
Hope this helps.

Glenn

Despite this age of PC-based GUIs, many operating system maintenance tasks are still best performed from the DOS command prompt. One of these is cleaning up after sloppy applications that leave trails behind in the form of temp files. I use an application that is particularly egregious in this regard. It creates a new set of multilevel subdirectories off the system's temp directory each time it runs. After a few sessions, I end up with several unused trees of temporary directories and files that are a hassle to remove manually.

To automate the process, I dug into the undocumented depths of DELTREE. It turns out that with the proper syntax, DELTREE is an efficient tool with which to clear out all the junk in a multilevel directory tree. But if you use DELTREE as documented, it also deletes the directory you are trying to clean up. For example, the command

    deltree/y c:\temp

removes everything, including the TEMP directory itself (the /y parameter suppresses deletion confirmation).

If, however, you add a backslash to the end of the command, so that it becomes

    deltree/y c:\temp\

the TEMP directory is left intact and empty. Nothing in the DOS 6.2x or 7.0 help files gives any hint of this useful behavior. I now use the DELTREE command in my AUTOEXEC.BAT file, to clean up the temp directory automatically each time the system boots.

   
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 5

Expert Comment

by:compmania
ID: 2585660
Just go to start, shutdown, restart in msdos mode, you should be in the c:\windows> dir, do a cd temp then a del *.*

All the files in the c:\windows\temp dir are just leftover from installs of programs etc... so if you delete them nothing should happen.
0
 
LVL 18

Accepted Solution

by:
centerv earned 100 total points
ID: 2585779
As stated by compmania, they are pieces of leftover installs of programs.

When you do an install, and you see where the files are being unzipped to the temp folder,
then the program gets installed from those unzipped items.
A well written program will also have in it to delete the installation pieces, one of the things that happens when you reboot.
Many programs dont, and leave the pieces where they are, the temp folder, which is the default for the installation program.
If you unzip the program to a different folder, then it would leave them there.

Beside the obvious that it's taking up space, there also the possibility of conflicting with the system and applications that use many of those parts
that are duplicates in the temp folder, and you start getting error messages.

The word temp is short for "temporary", so out they go.

Open the temp folder, from file menu, select all, right click and delete.

If you need more convincing, in win98 right click you C: drive, go to properties, click on disk cleanup and see your options.

If there's paranoia about deletions, then you can

1) copy folder and contents to Zip disk or other media, keep until you're comfortable to trash.

2) Use Winzip or similar, turn it into a zip file and get rid of the real contents of the folder.

Should you by some strange reason need any of the files, from 1) you can copy the file you want, and from 2) you can use SFC to extract the file you're looking for, without unzipping again.

When you've completed the manuvering, its also a good idea to clean your registry.

Reboot to dos, and at prompt type

scanreg/fix

and hit the enter key.

Reboot and your pc will thank you.









0
 
LVL 8

Expert Comment

by:netmage
ID: 2585836
EvilEye24, putting it simply TEMP means what it says.

I believe most of i have to say here has already been posted so here's my 2 cents worth.

Its the default conventional place to temporarily open files. As stated above, these are usually self unpacking install files. Any program that leaves info in this directory expecting it to be there after a reboot isn't designed to work.

2 lines i have had in my autoexec.bat for several years are:

DelTree /Y C:\WINDOWS\Temp
MD C:\WINDOWS\Temp

I have not had any problems.

There may be arguements to say what happens if the system crashes, well to that i can say most MS windows progams when making temp personal original data backups like Word, tend to place these elswhere and most ask for a default storage dir when you set them up.



0
 
LVL 2

Expert Comment

by:msledd
ID: 2585843
Hi!

Just my personal two cents here... I keep a shortcut to my windows\temp folder on my desktop and delete *everything* in it on an average of once a day at shutdown. If there happens to be something in there that Windows or an open application needs, an error appears stating that access to the file is denied (pretty easy way of determining what stays and what goes ;o).
I have never experienced a problem with doing this, I have however had much experience with problems relating to a bloated temp folder (there is a limit to the # of files/folders that are allowed in there)or the existence of leftover/corrupted files there. The presence of these files in the recycle bin, typically poses no problem, and *if* the files do turn out to be needed they can be restored from there.

The only exception to my habit of clearing this folder is if I have just done an install or upgrade/patch, many times "cleanup" files or instructions for system file updates during reboot are contained in the temp folder, so I let them do their thing and get them cleaned out next time.

Hope this helps!
Msledd
0
 

Author Comment

by:EvilEye24
ID: 2586179
centerv-
thanx for the guidance. I followed your recommendations, and all seems to be well.
0
 
LVL 18

Expert Comment

by:centerv
ID: 2586226
Glad to hear it, and thanks.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question