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: analyze disk from a command line?

30 Jun 2012   #1
fluidmotion

Win7 Starter 32 bits
 
 
analyze disk from a command line?

how do u analyze disk or defrag disk from a command line?


My System SpecsSystem Spec
.

30 Jun 2012   #2
solarmystic

Windows 7 x64 Professional SP1
 
 

To defrag from command line:-

At the command line type in defrag followed by the parameters you wish to add on it

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.

So for example if you wish to analyze and defrag C: you'd type in:-

defrag C: /A

Hope that helps!
My System SpecsSystem Spec
30 Jun 2012   #3
Night Hawk

Windows 7 Ultimate x64, W10 Preview - Second remote tower Windows 7 Pro x64
 
 

That's an easy one there! You can look at two different pages for this. The first being a thread over at VistaForums seen at Analyze Disk Fragmentation - Vista Forums

The other is an eHow guide on how to go about this from the command line or Start>Run seen at How to Defragment From a Command Line | eHow.com

And for the bold you can start up the Defrag tool from a command prompt window as well as described in a Techdunes guide. Defragment your Hard Disk from Command prompt. | Techdunes
My System SpecsSystem Spec
.


30 Jun 2012   #4
fluidmotion

Win7 Starter 32 bits
 
 

an error message showed up,
do u know how to fix this?

-defrag.command.png

Quote   Quote: Originally Posted by solarmystic View Post
To defrag from command line:-

At the command line type in defrag followed by the parameters you wish to add on it

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.

So for example if you wish to analyze and defrag C: you'd type in:-

defrag C: /A

Hope that helps!


My System SpecsSystem Spec
30 Jun 2012   #5
Golden

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64
 
 

Hi,

You need to run the commands from an elevated command prompt:

1. Click Start Orb
2. In search box, type cmd
3. Right-click on cmd.exe, and choose 'Run as Administrator'

See image below - note the prompt

Regards,
Golden


Attached Thumbnails
-capture.jpg  
My System SpecsSystem Spec
30 Jun 2012   #6
Night Hawk

Windows 7 Ultimate x64, W10 Preview - Second remote tower Windows 7 Pro x64
 
 

When going to Start>Programs>Accessories you simply right click on the command prompt shortcut there as well to open up an elevated prompt. You can create a shortcut for this as well. Elevated Program Shortcut - Create for Standard User
My System SpecsSystem Spec
01 Jul 2012   #7
fluidmotion

Win7 Starter 32 bits
 
 

thank u,

Quote   Quote: Originally Posted by Golden View Post
Hi,

You need to run the commands from an elevated command prompt:

1. Click Start Orb
2. In search box, type cmd
3. Right-click on cmd.exe, and choose 'Run as Administrator'

See image below - note the prompt

Regards,
Golden
My System SpecsSystem Spec
Reply

 analyze disk from a command line?




Thread Tools





Similar help and support threads
Thread Forum
Command Line - Help
Hi Guy's and Girls, Just first off I've never been too good with CMD and only an Apprentice in my company I work for. Now something I've wanted to do for awhile was to make the following but I don't necassirealy I know how to do this in one batch file: I would need a Batch file that is...
General Discussion
UAC bug with runas from command line?
Hi Folks, I am experiencing what I believe is a bug with UAC in Windows 7. I would like to see if anyone can recreate this issue and tell me if it is a bug or is working as expected. To recreate the issue: 1. Confirm the following local security policy setting is Enabled. Local Policies...
General Discussion
How to analyze CBS.log file by SFC command to detect corrupt files?
Hey, i have some probs now so iv ran sfc /scannow and i got that: "Windows Resource Protection found corrupt files and was unable to fix some of them..." it also told to look at the folder of the log file to found the cbs.log and then i ran this command to pull out the actual probs: findstr...
Performance & Maintenance
libraries and the command line
I am a long time programmer and computer science professor, since 1979. I grew up with the command line and like it just fine. But Windows 7 seems to change the GUI way of doing things and not mess with the command line. Yesterday I was at the command prompt and went to C:\users\Stockwell and...
Performance & Maintenance
Does Scheduled Defrags analyze the disk first?
I have my disk defragmenter set to run every Sunday at 6, yet sometimes I'll go back after 6 and do a disk analysis and I'll see that 1-2% is defragged! Does the scheduled disk defrag program not analyze the disk first? If that's the case it will never defrag anyway, right?
Performance & Maintenance
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
General Discussion

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 03:14.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App