I'm trying to consolidate my system partition volume by running defrag in a command prompt in command line recovery mode.

This is the command I'm trying to have executed: defrag C: /X /H /U

After I enter the command above all I can see is:

Microsoft Disk Defragmenter
Copyright (c) 2007 Microsoft Corp.

and the line is ready to take new commands. No reports, no time used to execute the operation.

Am I doing something wrong? Is the operation executing in the background?

  • Run the following command and post here the full output: wmic logicaldisk get caption,filesystem,size,volumename – and31415 Aug 3 '14 at 12:16
  • here you are: Caption FileSystem Size VolumeName C: NTFS 100075040768 OS D: NTFS 216149475328 E: – maja Aug 3 '14 at 13:17
  • Judging by the output: C: is 93 GiB and it's associated with the operating system; D: is 201 GiB and is probably used to store personal data; E: should correspond to a CD/DVD drive. Correct if I'm wrong. Which steps did you follow to run the defrag utility, exactly? Do you get the same issue if you try defrag D: /X /H /U instead? – and31415 Aug 3 '14 at 14:27
  • You're right about the data given by logicaldisk, the machine also has a FAT recovery partition and ext4+swap partitions. – maja Aug 3 '14 at 17:43
  • The steps I took are to enter Windows in safe made and then input the command in a prompt. I tried to do this in command prompt recovery mode (no gui), in "normal" recovery mode (in this case I did elevate the prompt) and in a normal session. In the normal session the command executes without any problem, in recovery mode it just gives the copyright info and no other output. – maja Aug 3 '14 at 17:49

atm, that's the answer:

Is Disk Defragmenter disabled by default in Windows 7 Safe mode?

Why is Disk Defragmenter disabled by default in Safe mode in Windows 7?

  • also, if someone would change the question into "defrag command line in Windows 7's recovery mode" the whole post would make more sense.. – maja Aug 3 '14 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.