Defrag command line switches

If you want to schedule the defrag of your HDD, then these command line switches are available.

DEFRAG :

  • drive: - Drive letter of the disk you want to defrag
  • /all - Defrag all local, non-removable drives
  • /F - Defrag files and free space
  • /U - Defrag files only
  • /Q - Defrag free space only
  • /concise - Display the Hide Details view
  • /detailed - Display the Show Details view
  • /noprompt - Immediately starts Defrag
  • /Sageset:x - Used to create a profile (x is a number from 0-65535)
  • /Sagerun:x - Used to execute a created profile (x is a number from 0-65535)

More Info MS KB155326

Related Defrag partitions to speed up file access