Solved

clean out windows\temp??

Posted on 2000-03-05
9
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

628 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