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

Updated: 23 September 2007

Comments:

  1. Ant says:

    no such command as /Q on mine...

  2. Ant says:

    there is:
    defrag - defragment
    - drive letter, C or E on mine
    [-a] - analyse only
    [-f] - force defrag regardless of free space (min 15% required ordinarily)
    [-v] - verbose output - ?????!!?, verbose?
    [-?] - "display this help text" yeah... really HELPful...

  3. Snakefoot says:

    Are you using Windows 98/Me ? Or are you using Windows XP/Vista ?

    Some of the command line switches is not part of the official command line help.

Leave a Reply

Your email address will not be published. Required fields are marked *