Keeping your PC hard disk in top condition can
help your overall system speed. One of the factors that can slow a
computer’s performance is a highly fragmented file system.
Here’s how it works.
When your PC is brand-new out-of-the-box fresh,
your operating system and various files are (more or less) stored in
an optimal fashion. As you use your system, files are added,
deleted, and moved around, which can leave "gaps" between files.
Each file on your hard disk can be stored in one piece from start to
finish only if there is enough continuous empty space for the file
to "fit" into. For example, let’s say that your hard disk has 1.2GB
of free space available. If you are saving a 650MB image of a CD
onto your disk, there may not be 650MB of continuous free space, but
there may be lots of "gaps" free that, when added together, make up
the 1.2GB of free space. So, the operating system will write a piece
of the file here, a piece over there, and so on until it has
completed writing the file. Now, the 650MB file has fit onto the
disk ok, BUT it is spread out all over the place. When reading back
the file, the disk has to bounce from place to place to gather it
all back up instead of simply gliding across and reading the file in
one stroke. This "thrashing" around to read and write files is the
big slowdown (and is the clickety-clack noise that is annoying to
listen to while waiting). This problem is called FRAGMENTATION –
files are strewn about the hard disk like a jigsaw puzzle that needs
to be put together.
Fortunately, there is a solution.
In Windows 2000 and XP, you can run a
defragmentation utility, called "defrag" to optimize your hard
drive(s). Running this utility (at least once a month, sometimes
weekly) will take the jigsaw puzzle mess of files and reorganize the
hard disk into continuous files, returning you to that new-car
smell, factory fresh feeling.
Here are a few ways to do this:
Run the defrag utility manually and interactively
In Windows 2000 and XP, go to Start -> Programs -> Accessories
-> System Tools -> Disk Defragmenter. This will start the
"defrag" program. Simply highlight the disk that you want to
optimize, click the "Defragment" button, and you’re on your way.
NOTE: It is best to do this when you are not going to be using
your computer, because the defrag operations will slow down your
PC tremendously, and using the PC can interfere with the defrag
process.
Run the defrag utility manually and non-interactively (XP
only)
From a COMMAND prompt window, type:
defrag c: -fv
This will defrag drive C. Replace the "c:" with the drive
letter of your choice.
Run defrag automatically at a scheduled time (for WindowsXP
only).
You can schedule the #2 option above to run
automatically. This is particularly handy if you leave your PC
on and running all the time. Let’s say that you want to schedule
a defrag of your C drive every Saturday at 2:00 A.M. First,
create a batch file that will run the defrag. Do this using
NOTEPAD to create a text file called DC.BAT in the root
directory with the following line:
defrag c: -fv >> c:\temp\dc.log 2>&1
Be sure to press Enter after the end of the line and then
save the file. This batch file will run defrag and put all
output messages into a log file called "c:\temp\dc.log" so that
you can review what transpired while you were asleep.
Next, let’s schedule the task for Saturday at two A.M. (you
won’t be using the PC then, will you?). Open a command prompt
window and type the following after the prompt:
at 02:00 /every:s c:\dc.bat
You now have a scheduled task ready. To check your scheduled
tasks, type:
at
and it will show you the list of scheduled tasks as in the
following example:
Status ID Day Time Command
Line
--------------------------------------------------------------
1 Each S 2:00 AM c:\dc.bat
You can easily remove the scheduled task using the following
command:
at 1 /del
Use the appropriate task ID number (our example above was "1",
but your number may be different if you have other scheduled
tasks).
Customer Quote:
"You have talented and dedicated people working for you. They are superlative. DRS appreciates their efforts and I personally am most grateful to be working with such an excellent group."