Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: CMD defrag has stopped working

18 May 2011   #1
outlawed

Windows 7 Home Premium SP1 x64
 
 
CMD defrag has stopped working

Everything was working fine last night, and I haven't made any changes to my system whatsoever and now when I booted up this morning my cmd line defrag doesn't want to work anymore.

Disk defragmenter via system tools still works, it's just the cmd line part doesn't want to work anymore.

Any ideas on what could be causing this?




Attached Images
CMD defrag has stopped working-defrag.png 
My System SpecsSystem Spec
.
18 May 2011   #2
Hopalong X

Windows7 Pro 64bit SP-1; Windows XP Pro 32bit
 
 

Take a look here. Defrag
It appears the command is written wrong from examples shown.

You may want to bookmark the below page. Reference for all CMD's.
http://windows.microsoft.com/en-US/w...rence-Overview




Quote:
To defragment the volume on drive C while providing progress and verbose output, type: defrag C: /U /V

To defragment the volumes on drives C and D in parallel in the background, type: defrag C: D: /M

To perform a fragmentation analysis of a volume mounted on drive C and provide progress, type: defrag C: mountpoint /A /U

To defragment all volumes with normal priority and provide verbose output, type: Defrag /C /H /V
My System SpecsSystem Spec
18 May 2011   #3
outlawed

Windows 7 Home Premium SP1 x64
 
 

Quote   Quote: Originally Posted by Hopalong X View Post
Take a look here. Defrag
It appears the command is written wrong from examples shown.
The command is correct, as it's the same command I have been using.

The /c parameter invokes on ALL volumes.

The command I use is even used as an example when defrag /? is done:

Quote:
Examples:

defrag C: /U /V
defrag C: D: /M
defrag C:\mountpoint /A /U
defrag /C /H /V
My System SpecsSystem Spec
.

18 May 2011   #4
Capt.Jack Sparrow

Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
 
 

My System SpecsSystem Spec
18 May 2011   #5
outlawed

Windows 7 Home Premium SP1 x64
 
 

Quote   Quote: Originally Posted by Capt.Jack Sparrow View Post
Thanks for the link, however I know how to do defrag via command prompt as I've been doing it for as long as Microsoft has been allowing it. :P

I did a defrag via cmd last night with the "defrag /c /h /v" line and everything worked perfectly, just that it stopped working when I booted this morning.

Will give the sfc /scannow a go and post results when it finishes.

UPDATE: sfc /scannow has finished and found nothing wrong:

Quote:
Windows Resource Protection did not find any integrity violations.
My System SpecsSystem Spec
18 May 2011   #6
Capt.Jack Sparrow

Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
 
 

Hi there,

After SFC I assume you rebooted and tested it. Enable Build-in administrator Built-in Administrator Account - Enable or Disable and test it in that account and see if it works. Maybe it's something up with User profile.
My System SpecsSystem Spec
18 May 2011   #7
Ztruker

Windows 10 Pro X64
 
 

What happens if you enter defrag /?
My System SpecsSystem Spec
19 May 2011   #8
outlawed

Windows 7 Home Premium SP1 x64
 
 

Quote   Quote: Originally Posted by Ztruker View Post
What happens if you enter defrag /?
This:

Code:
C:\Users\>defrag /?
Microsoft Disk Defragmenter
Copyright (c) 2007 Microsoft Corp.

Description:

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

Syntax:

        defrag <volumes> | /C | /E <volumes>    [/H] [/M | [/U] [/V]]
        defrag <volumes> | /C | /E <volumes> /A [/H] [/M | [/U] [/V]]
        defrag <volumes> | /C | /E <volumes> /X [/H] [/M | [/U] [/V]]
        defrag <volume>                      /T [/H]       [/U] [/V]

Parameters:

        Value   Description

        /A      Perform analysis on the specified volumes.

        /C      Perform the operation on all volumes.

        /E      Perform the operation on all volumes except those specified.

        /H      Run the operation at normal priority (default is low).

        /M      Run the operation on each volume in parallel in the background.

        /T      Track an operation already in progress on the specified volume.

        /U      Print the progress of the operation on the screen.

        /V      Print verbose output containing the fragmentation statistics.

        /X      Perform free space consolidation on the specified volumes.

Examples:

        defrag C: /U /V
        defrag C: D: /M
        defrag C:\mountpoint /A /U
        defrag /C /H /V
My System SpecsSystem Spec
19 May 2011   #9
Ztruker

Windows 10 Pro X64
 
 

Okay, same as I see.

I tried this with Win 7 Ultimate running under Oracle Virtual box and it would not run. Said insufficient permissions.

I then opened an Elevated Command Prompt (right click on Command Prompt and select Run as Administrator) and it ran correctly. Try that, see if it helps.
My System SpecsSystem Spec
Reply

 CMD defrag has stopped working




Thread Tools




Similar help and support threads
Thread Forum
defrag, msconfig not working
When I click to start defragmenter the window appears but when I then click Analyse or Defragment the window stops responding. When I click to start msconfig nothing happens. The AVG antivirus did not find any virus. Malwarebytes found a file in a temp directory and removed it, but this...
General Discussion
defrag not working
Defrag will not work on the command line or on the control panel. tried startup repair, SFC but still will not work. Also there is no disk defragmenter in services. Any help would be appreciated.
Performance & Maintenance
Windows installer has stopped working or setup.exe has stopped working
HI, I'VE INSTTALED WINDOWS 7 PROF.ON MY PC. I M TRYING TO INSTALL WINDOWS7ULTIMATE BY CLICKING ON SETUP.EXE AN ERROR MASSAGE APPEARED SAYING: THEN I TRIED TO INSTALL WINDOWS 8 ON MY PC.. BUT THE ERROR MASSAGE APPEARED SAYING SAME THING AND ALL OTHER SETUP IN THAT DRIVE ARE SAYING SAME...
General Discussion
Auslogics Disk Defrag vs IObit Smart Defrag
Which Defragger do you think is better, because I am trying to decide between the two, but can't decide on one or the other.
Software
Does Puran Defrag 7.3 Free work with Windows 7 Defrag disabled ?
I normally set the Disk Defragmenter Task Schedule to DISABLED, and leave the Windows Disk Defragmenter defragsvc set to DISABLED. Will Puran Free be able to safely and fully operate under these conditions, or should I change defragsvc to MANUAL. I occasionally create a Macrium FULL image...
Software
Disk Defrag isnt working in Windows 7?
I have a E drive that's 1.5TB and I download movies and delete movies from there. I know 100% its fragmented like crazy. But when windows 7 analyzes it it says its 0% fragment. Is this correct?
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 02:52.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App