Defraggler comes with a command-line version of the GUI program
called df.exe. This program is located in the same folder as
defraggler.exe, typically C:\Program Files\Defraggler.
You can pass commands to df.exe using batch files. The syntax
for calling df.exe is as follows:
df.exe [file or filemask or folder or drive label] [/?] [/L] [/S] [/debug]
Where:
| Parameter |
Description |
| /? |
Help switch: Displays a list of available parameters and
provides examples.
|
| /L |
Lists all drives that Defraggler can defragment on this
computer.
|
<drive>
|
Defragments the specified drive.
|
<item>
|
Defragments the specified file or folder. You can chain
multiple <items> together, but they all must be located on
the same drive.
|
/S
|
For a specified folder, Defraggler will also defragment any
subfolders beneath it (recursive). |
/debug
/debug2
/debug3
|
Runs Defraggler in debug mode for troubleshooting purposes.
Debug2 and Debug3 provide increasingly more details. See
this topic for more information about the log files that debug
creates.
|
| /shutdown |
Shuts down the computer after Defraggler completes
operations.
|
| /large |
During defragmentation, Defraggler moves large files to the end
of the drive to improve performance. For more information, see
this topic. Defraggler will use the existing settings on the
Defrag tab of the Options dialog
box.
|
| /QD |
Defraggler will use the Quick Defrag process (faster, but not
as efficient as regular defrag). You can only use the /QD flag when
defragmenting an entire drive -- not a specific file or folder. You
cannot use the /QD flag with the /large flag; Defraggler will
return an error message.
|
Examples
df.exe C:\testfile - defragments the file
C:\testfile.exe.
df.exe C:\Windows /shutdown - defragments all
files in the Windows folder on C:, and then shuts down the
computer.
df.exe C:\Windows\*.exe - defragments all .EXE
files in the Windows folder on C:.
df.exe "C:\Program Files\*.exe"
C:\Windows C:\new.txt
- defragments all .EXE files in the Program Files
folder, all files in the Windows folder, and the new.txt file at
the root of C:.
df.exe C:\ /large - defragments all files on
the C: drive, and moves large files to the end of the drive.