PC101-Personal Computer 101
How do I houseclean my hard disk and when do I?

Housecleaning your hard disk is both an art and a science.  And as the term implies it can be a tedious and time consuming activity.   Yet if you do not do this, you either better have a 120GB disk and/or don't mind waiting around for your disk to put the pieces of your files together for you.
Housecleaning your computer
Windows comes with several utilities to help you in this process and you can even modify them to do more then they were intended to do.  XP comes with Disk Cleanup which checks all the logical and reasonable places that files might get stored and forgotten, and allows you to pick and choose what to remove or compress.  This program, along with defrag and disk check can be automated to run at various times without your intervention, thereby making your housecleaning a whole lot easier.

There are so many things you could look at in your search to remove unneeded files, so this page may become quite large over time, as I am somewhat obsessive on this subject, and not only search my whole disk structure every so often but look at what's in the
System Registry, Programs Add/Remove and even clean out the "temp" directories of files that have remained too long (I will show you how to condense the many system temp directories to one, that you can check on occasion for squatters).

General Rules for reducing your used disk space
You can help yourself with housecleaning by condensing the many directories where temporary files are stored to just one.  Temp directories are storage areas for programs that get started on your system to put files they need to create while they are running, but do not need after they terminate (install programs often leave files there after the install is complete).  Often these files are not removed by the program when it quits and remain on your system in those temp directories.   Having multiple Temp directories makes it just that much harder to find them and remove files that are in there that are of no use any longer.   Here is a way to create one Temp directory that you can easily find and remove old files from (XP only).  It is somewhat involved, so if you do not feel comfortable messing with the internals of a computer, then you may want to skip this one:

I)  If it does not already exist, create a "TEMP" directory right under your disk drive using the Explore utility.  Look under your disk in Explore by clicking the box with the "+" symbol next to it to open up its file structure for display (if already open it will be a "-" symbol).  Explore display

For example, if your disk letter is "C" then you would look under that device to see if a  directory called TEMP is already there. 

If not, you would left click on that disk drive in the left window of Explore to highlight it, then go above to the window File option (left click) and select New and then select Folder.   When the new folder appears in the right half of the window ("New Folder") rename it to:   TEMP


Then goto to Start / Settings / Control Panel / System / Advanced tab, and click on Environmental Variables.   What you want to do here is change all the locations for temp directories to the just the new one.  Again, if your disk letter is "C" then that would be:
C:\TEMP

The top part of the screen defines things for your User account -- the one you use to login to the system and the bottom are those for the system in general (for all accounts on the system).  You want to Edit and change any variable values that define: TEMP, TMP or TEMP\
(usually 2 in the top window and 2 in the bottom window).  But first, write down what each User and System temp variable name and what its current value is, so you can put things back to the way they were if you want to.

To Edit them, left click on the line to highlight it, then click on the Changing variablesEdit option just below it.  On the left is an example of changing the System Variable TMP to the new definition.  Remember "C" is the letter of your disk drive, which usually is C but the Explore utility will display what it is for your system.
 
Note in the example that after clicking the Edit option the Variable value: was changed to C:\TEMP

Do NOT change the Variable name:, ONLY the Variable value: for the TEMP, TEMP\ and TMP variables. 

When you are done it should look something like below:
All 4 entries Variables Changed set to C:\TEMP

Click OK when done with all entries and sure they are right.   If you get confused about what you've done or not done, or you just don't want to go ahead with it, then you can click Cancel so no changes are accepted by the system.  

Any changes you made will take affect after you reboot.    If all is working correctly then files will start accumulating in your new Temp directory and the old ones will not be used anymore.   Here are examples of what those old temp directories might be, but vary depending on what your username is and how many user accounts you have on your system.  Again, in this case, the letter of the disk drive is "C". 

Alternate Temp directories:
C:\Windows\Temp
There will probably be a Temp directory for each user account under the directory \Documents and Settings, e.g.:
C:\Documents and Settings\Default User \Local Settings\Temp
C:\Documents and Settings\LocalService\Temp
C:\Documents and Settings\NetworkService\Temp

You are pretty safe deleting files in Temp directories, as if the file is actually still being used then you will be told you can't delete it for that reason.

laptop
laptoplaptoplaptoplaptop

II)  Use the Disk Cleanup utility (XP).   It will look at some Temp files, files that are not used allot and maybe compressed in size, temporary internet files, files in your Recycle Bin (disk space is not really freedup until you remove deleted files from the Recycle Bin), and other potential sources of housecleaning.   You can pick and choose what you want Disk Cleanup to do (check or check or uncheck uncheck the enable boxes), and even look at what files (View Files) it is talking about before deciding whether to allow it to do its thing on them.  DiskClean utility

If it shows files that could be compressed click on Options... to view and change if you want how many days must go by before an unaccessed file will be considered for compression (default is 60 days).

Notice the other tab at the top of the window called More Options.  Here you can perform 3 more housecleaning type operations.

Here is what they do:

1) Windows components: This option allows you to add or remove the utilities that come with the Windows Operating System.   For example, you could add the Calculator utility or you could remove the games programs because you do not use them.   Operating this utility can be confusing so remember you can always backout with the Cancel button.   Basically the main categories are displayed in the window at first.   If the enable box next to the category is not checked check or uncheck then that means you do not have any of the utilities for that category installed currently.   To see what utilities are in that category, then left click to highlight the category and click on the Details... button below.  If the category has no utilities then the button will be greyed-out.

If it has utilities in that category, then the same is true for them, i.e. if the box is checked
check or uncheck then they are on your system, if not checked, then they are not on your system currently.

If do not know what the utility is and how it affects your system from either knowledge or from the information given about it in this program, then you best just leave it alone.
Add/Remove program
However you can use this program to remove utilities or even whole categories of programs that you do not use, or add something you think you could use.   Again, be careful in Windows Components as anything you change, i.e. check or uncheck that was different before, will either be removed or added if you click the Next> instead of Cancel button upon leaving the program.

Potential files that can be deleted
Note
: you need to be able to see the suffix of files in Explore (file manager), so make sure that under Folder Options / View  you do not have the box for Hide extensions for known file types checked check or uncheck !

Check these files (e.g. open a .log file, display a graphics file) to see if they can be deleted:
*.log   *.tmp   *.temp   *.txt   *.doc(possible MS Word file)   *.readme
*.jpg(graphics image)    *.bmp(MS Paint image)    *.gif(graphics image)

Automatic Shutdown/Housecleaning Program
Finally, you can spend as much time as you like on housecleaning as it is never ending, like maintaining a house.  You can do things that both get the jobs done and without causing you to spend time actually doing them, e.g. by automating the jobs via the Task Scheduler (see below) or making your own programs to run Batch mode.  I have created a Shutdown Batch program that runs all the jobs I want done and then shutdowns the system as normal.   The program purges the TEMP directory, defrags the disk, runs the Registry/disk cleaner (CCleaner), Windows Disk Cleanup, the disk checker: chkdsk, and then shuts the system down in 10 seconds.  I wait 10 seconds in case I change my mind about shutting down (shutdown -a aborts shutdown) or I want to read any comments displayed by the programs I ran.   If anyone wants this program and directions for using it, send me email.

You can also do the same thing, without the programming, using the Windows Scheduled Tasks Manager (Control Panel).   This program walks you through adding programs to run at scheduled times.   The program is quite extensive and you can schedule jobs to run hourly, daily, weekly, etc.; when the computer is idle and more.

 TIP:  By default, if you are not sure if you need a file or a program, then do not remove or delete it.   Investigate it first.   Remember: for most files, even if you delete them, they remain on the system until you empty the Recycle Bin.

 TIP:  Want to houseclean your Desktop of all the clutter?   See the Desktop Cleanup question.

Got questions you would like answered?  Yes

Home Page of author's websitesSend email to Keonikeoni@isp.comGo to Home Page