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.

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
- Remove Programs and Applications when
you no longer need them, before installing any replacement programs
- Create a directory (e.g. C:\Amove)
to download programs and files to, and then check this directory on
occasion for old install programs and related files to delete
- Create one temp directory
(e.g. C:\Temp) and configure that to be the only one
- Use the Disk Cleanup and defrag
programs to keep your disk efficient
- You can reduce the space allocated for
storage (caching) for programs like System Restore and your
internet browser(s)
- Get use to using the Explore
file management utility and scan you disk structure on occasion to get
use to its structure and to find unnecessary files and directories
- If your computer has other users on
it, you can set disk space quotas for them
- Get use to using the Add/Remove
Programs utility in the Control Panel
to check for applications that you do not use anymore and can remove
from the system
- If all else fails, you can either
get/add a larger disk or you
can turn on the Windows option of Disk
Compression, which as its name indicates, will compress your
disk data so you are using less space on your disk. The trade-off
is that Compression will slowdown access time to your files somewhat,
but maybe less than having to do so on a full, fragmented disk
- Finally, remember: until you empty the
Recycle Bin your
"deleted" files are still on the disk
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). 
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
Edit 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
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.





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
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. 
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
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
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.

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
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


keoni@isp.com