HOME

ABOUT US CONTACT DOWNLOADS FORUMS

SEARCH

 

 

Defragmentation Programs

for

Windows XP, 2000, & NT

header_top1

 


 

header_top1

 

Register Software

 

Defragmentation Information

 

DIRMS Details

 

Buzzsaw Details

 

DIRMS Help

 

Buzzsaw Help

 

Why these programs exist?

DIRMS HELP FILE

 

Remember, you use this program at your own risk! That having been said, all the calls that this program uses are journalled, meaning disk corruption is unlikely if not impossible. It uses calls in the NTDLL.DLL, which other defragmentation programs also use, so it's as safe as those other programs.

Disk defragmentation is not an easy task with the APIs that Microsoft provides. The APIs provided are, for the most part, undocumented. The documentation that does exist is inaccurate in many areas. I've programmed around the strange behavior for the most part, but I am providing my e-mail address as a point of contact. If the program halts or puts up a dialog box, please record the location and the type of error, and e-mail me so I can improve the program. My e-mail address is support@dirms.com .
 

This program requires Administrative rights to run.   All defragmentation programs require this, but some are run as services to get around this problem.   This program will one day do the same.  

You must run it from a command prompt.   You can get a command prompt by clicking "Start", then "Run", and then typing "cmd", and then pressing return or enter.   You can also find it under accessories from the start menu.   You can use the DOS command CD to change directories to the program location, or just type the location of the program, e.g. "c:\downloads\defragmentation\dirms c -q".   (NOTE:  "c:\downloads\defragmentation" isjust an example,;you must know where you downloaded the program.)


This program only works on NTFS, FAT, and FAT32 drives under Windows NT 4.0 (pro or server), 2000 (pro or server), and XP (home or pro).    This program will not run under ME, 98, 95, or Linux.  The program can be run by simply typing "dirms <drive letter> -q", e.g. "dirms f -q". This will defragment drive "f" on your computer as quickly as possible. DIRMS tries to defragment, then maximize the free space on the drive, and then defragment again.

One of the biggest problems I have with other defragmentation programs is that they stop prematurely.  In analyzing disks defragmented with those programs, I've noticed a lot of wasted space between files. DIRMS can be run in a way to try and minimize the space between files. This in essence packs the files as closely together as possible. The program can be requested to perform compaction by typing "dirms <drive letter> compact", e.g. "dirms e compact". This command will try to compact all files. Another method for compacting, is the "dirms e compact -q" command. This is used to speed up the compaction, by only compacting files with free space both before and after the file. If another file is adjacent to the file (either in front or behind), it is not compacted. This obviously will save some time in compaction, but it won't do as good a job.

Files can be moved by typing "dirms <drive letter> move lcn" which instructs the program to move files from the end of the drive as far as possible to the beginning . Files can also be moved towards the beginning of the drive according to the last modified date by typing "dirms <drive letter> move date".

Some files are just to huge to be entirely defragmented when the disk is really full. One option is to let the program try and defragment as much as possible of a file. This is done with the "COMFRAG" options. Typing "dirms <drive letter> COMFRAG <filename>", e.g. "dirms e COMFRAG e:\temp\test.exe" will attempt a defragmentation by finding all the fragments and packing them together as closely as possible. In other words,.a file consisting of originally 250 fragments may only have 45 fragments after executing this command.  
(NOTE:  version 1.2 of this program automatically performs partial defragmentation, so the option is not available and produces an error message).

The "-q" option allows the program to not bother with waiting on the file to be completely moved before continuing with another file. When compacting, it means less compaction, and when moving files, it means not waiting until the operating system has marked the moved clusters as free. One of the biggest gripes I have with the MS tools is that once a file is moved, it takes a while to update the free space on the drive. This can require a long wait while the OS decides to play with itself.

CTRL+C: Stops the program. In case you need to interrupt the program, hold down CTRL while typing C. This is completely harmless, however. 

 

Examples: 

dirms <drive letter> [DEFRAG, COMPACT, COMFRAG <filename>, MOVE] [-q]
[COMFRAG PARAMS = filename]
[MOVE PARAMS = LCN, DATE]
-q means do it quickly, don't wait until the free space bitmap is updated.

BLUE -  the command     Black -  the explanation


dirms c -q   :  Do free space evaluation, defragment, and quickly move files to the front of the drive 
dirms c DEFRAG -q : Defragment files only 
dirms c CoMpAcT -q : C ompact only 
dirms c COMFRAG -q : Perform partial compaction (quickly) on all fragmented files 
dirms c COMFRAG c:\filename.exe   : Perform partial compaction on one file 
dirms c move date -q : Move files according to modification dates, and do it quickly
dirms c move lcn : Try to free space at the bottom of the drive (moves files toward the front of the drive)


NOTE:  The drive used in the examples is the C drive, but the drive letter can be any disk that supports defragmentation.