YourDefrag  SVN
Usage
Author:
Andriy Golovnya <andrew_golovnia@ukr.net> http://ag.embedded.org.ru/
URL:
http://yourdefrag.sf.net/
URL:
http://sf.net/projects/yourdefrag/
License:
GPLv2 http://www.gnu.org/licenses/gpl-2.0.html

Command Line Defragmenter Usage

The defragmenter can run a defragmentation process on several disks at the same time. It will run best if numbers of CPU cores in the system in more or equal to number of disks given to defragmenter for processing.

The defragmenter can read/write configuration file ?:\YourDefrag.cfg to handle a persistent set of values for each disk. Basically each disk can have own persistent configuration. See Disk Persistent Configuration File for more information.

Warning:
The defragmenter requires administrator permission to run. If UAC is active on your Windows you may get corresponding message.
Usage:
YourDefragCMD [-option [-option ...]] [disk1 [disk2 ...]]
Options:
-h, -help or --help

Print usage message.
Usage message includes basic information about all available option flags.

-v or -verbose

Print more (and more, and more) detailed information.
If user gives more verbosity flags more low level progress information will be printed on console.

-a or -all

Run defragmentation on all DOS disks.
The defragmenter will ignore disks mounted as reparse points. Defragmentation of such disks is not supported for now.

-m <num> or
-mode <num>

Use allocation mode <num>.
This information is analyzed by defragmenter DLL. Valid values are:

  • 0 = Analyze only, do not defragment and do not optimize.
  • 1 = Analyze and fixup, do not optimize.
  • 2 = Analyze, fixup, and fast optimization (default).
  • 3 = Deprecated. Analyze, fixup, and full optimization.
  • 4 = Analyze and force together.
  • 5 = Analyze and move to end of disk.
  • 6 = Analyze and sort files by name.
  • 7 = Analyze and sort files by size (smallest first).
  • 8 = Analyze and sort files by last access (newest first).
  • 9 = Analyze and sort files by last change (oldest first).
  • 10 = Analyze and sort files by creation time (oldest first).

This option overrides parameter Mode of configuration file.

-s <num> or
-speed <num>

Run <num> percents of the normal speed.
The defragmenter can slow itself down to make less impact on system behavior. This is useful if defragmenter runs as a background task or when the system lacks CPU cores.
Default value is 100%
This option overrides parameter Speed of configuration file.

-f <num> or
-freespace <num>

Reserve free <num> percents of space for temp files.
The defragmenter can reserve some free space at beginning of a disk for new files. This free space is intended for temp files.
Default value is 1%
This option overrides parameter FreeSpace of configuration file.

-e <list> or
-excludes <list>

Use semicolon separated <list> as an exclude list.
The defragmenter can exclude some files from defragmentation process. A user can specify several file masks to exclude necessary files.
This option overrides parameter Excludes of configuration file.

-u <list> or
-usehogs <list>

Use semicolon separated <list> as a space hogs list.
The defragmenter can move some files to space hogs area and the end of used space. A user can specify several file masks to put necessary files to this area. If no space hogs list is specified the default list will be used instead. See -defaulthogs option for more information.
This option together with -defaulthogs override parameter SpaceHogs of configuration file.

-U or -defaulthogs

Add defaults to user defined space hogs list.
User can use add his hogs list to default one. See -usehogs option for more information.
The default list of hogs file is:
?:\$RECYCLE.BIN\*;?:\RECYCLED\*;?:\RECYCLER\*; ?:\WINDOWS\$*;?:\WINDOWS\Downloaded Installations\*; ?:\WINDOWS\Ehome\*;?:\WINDOWS\Fonts\*;?:\WINDOWS\Help\*; ?:\WINDOWS\I386\*;?:\WINDOWS\IME\*;?:\WINDOWS\Installer\*; ?:\WINDOWS\ServicePackFiles\*;?:\WINDOWS\SoftwareDistribution\*; ?:\WINDOWS\Speech\*;?:\WINDOWS\Symbols\*;?:\WINDOWS\ie7updates\*; ?:\WINDOWS\system32\dllcache\*;?:\WINNT\$*; ?:\WINNT\Downloaded Installations\*;?:\WINNT\I386\*; ?:\WINNT\Installer\*;?:\WINNT\ServicePackFiles\*; ?:\WINNT\SoftwareDistribution\*;?:\WINNT\ie7updates\*; ?:\*\Installshield Installation Information\*; ?:\I386\*;?:\System Volume Information\*;?:\windows.old\*; .7z;*.arj;*.avi;*.bak;*.bup;*.bz2;*.cab;*.chm;*.dvr-ms;*.gz;*.ifo; .log;*.lzh;*.mp3;*.msi;*.old;*.pdf;*.rar;*.rpm;*.tar;*.wmv;*.vob; .z;*.zip
This option together with -usehogs override parameter SpaceHogs of configuration file.

-w or -write

Write disk config in default location.
The defragmenter can write a configuration to file ?:\YourDefrag.cfg to keep a current set of values as persistent for this disk.

-i or -ignore

Ignore current disk config information.
If this option is specified any configuration from file ?:\YourDefrag.cfg will be ignored.

-l <name> or
-logfile <name>
Put progress logging to a file <name>.
This option redirects an output of the defragmenter to specified text file.
Disks:
<letter>: Disk as a DOS <letter> with a colon symbol
Examples:
YourDefragCMD -v -v -a

Runs defragmentation on all available disks and shows progress information.

YourDefragCMD -f 3 -s 75 -w C:

Runs defragmentation on disk C: with 3% reserved free space and 75% speed and additionally stores modified configuration values in file C:\YourDefrag.cfg.

YourDefragCMD -i C:

Runs defragmentation on disk C: ignoring configuration stored in C:\YourDefrag.cfg if one exists.

YourDefragCMD -u "*.vhd;*.vmdk" C:

Runs defragmentation on disk C: using only files *.vhd and *.vmdk as space hogs.

YourDefragCMD -U -u "*.vhd;*.vmdk" C:

Runs defragmentation on disk C: using files *.vhd and *.vmdk in addition to default set of space hogs.

YourDefragCMD -v -v -v -v C: -l D:\C.log Runs defragmentation on disk C: with detailed progress information and redirects an output to a file located on disk D:.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines