eMachines Windows Vista FAQ

Windows®. Life without Walls™. eMachines recommends Windows 7.

Running Disk Defragmenter from Command Prompt

Advanced users can use the command line tool Defrag.exe to generate detailed reports and perform other advanced tasks. To run Disk Defragmenter from a Command Prompt, follow these steps:

  1. From the Windows Vista default Start menu, click All Programs, Accessories, right-click Command Prompt, and then select Run as administrator.

  2. In the User Account Control dialog box, click Continue.

  3. In the command prompt, type the appropriate command. The following command line switches are available for Defrag.exe:

    Command prompt window

    Description: Locates and consolidates fragmented files on local volumes to improve system performance.

    Syntax:

      defrag <volume> -a [-v]
      defrag <volume> [{-r | -w}] [-f] [-v]
      defrag -c [{-r | -w}] [-f] [-v]

Parameters
Value Description
<volume> Specifies the drive letter or mount point path of the volume to be defragmented or analyzed.
-c Defragments all volumes on this computer.
-a Performs fragmentation analysis only.
-r Performs partial defragmentation (default). Attempts to consolidate only fragments smaller than 64 megabytes (MB).
-w Performs full defragmentation. Attempts to consolidate all file fragments, regardless of their size.
-f Forces defragmentation of the volume when free space is low.
-v Specifies verbose mode. The defragmentation and analysis output is more detailed.
-? Displays help information.

Examples of use:

defrag d:
defrag d:\vol\mountpoint -w -f
defrag d: -a -v
defrag -c -v


© 2009 Gateway, Inc. All rights reserved. Terms and Conditions and Privacy Policy.