Defragmenting with Command Prompt

D

deango

Hi.
I learned in this NG to defrag my second hard drive using a command
prompt.

It worked well, showing I had five bad sectors. I now need to know an
additional command that does the same thing as the Defrag for my C drive
which has check boxes for:
'Automatically fix file system errors' and more importantly, 'Scan for
and attempt recovery of bad sectors'.
And would this be a separate command or appended to the original command
'CHKDSK /R D:' ? Thanks deango
 
G

Guest

For C: you'd type:Defrag C: The CHKDSK C: /R or /F Have no bearing to
the Defrag cmd,/R cmd is repair which fixes sectors also.For cmd options
type:Defrag /? CHKDSK /?
 
R

Rock

deango said:
Hi.
I learned in this NG to defrag my second hard drive using a command
prompt.

It worked well, showing I had five bad sectors. I now need to know an
additional command that does the same thing as the Defrag for my C drive
which has check boxes for:
'Automatically fix file system errors' and more importantly, 'Scan for
and attempt recovery of bad sectors'.
And would this be a separate command or appended to the original command
'CHKDSK /R D:' ? Thanks deango

That's what /R does. At a command prompt - Start | Run | Cmd | Ok -
type in chkdsk /?. It will give you a list of all the command line
options and what they do. The /R option will check for errors and scan
the hard disk for bad sectors.

See this article for an explanation of what happens in chkdsk and a
description of the switches:
http://www.microsoft.com/resources/...Windows/XP/all/reskit/en-us/prkd_tro_utol.asp
Here is a tiny url to that same one: http://tinyurl.com/3gb94

This is also a good discussion of what chkdsk does when it scans:
An explanation of the new /C and /I Switches that are available to use
with Chkdsk.exe
http://support.microsoft.com/kb/314835/en-us
 
G

Guest

I think you're confusing chkdsk and defrag!!!

Chkdsk can recover files and fix bad sectors.
Defrag just rearranges files so that all the little parts of the file all
are all in one location. When their not it is called fragmented. Defrag put
humpy dumpty back together again, if you follow the poor analogy.

You can run defrag in Normal or Safe mode.
Better if you use Safe Mode

for Chkdsk to repair, you actually have to reboot and let it run before
windows starts.

Chkdsk C: /r (C drive)
chkdsk D: /r (D Drive)
 
D

deango

Thanks Andrew E and Dixonion 69 for clarifying Defrag and Chkdsk. I was
stupid not to realize 'R' represented repair. And thanks to Rock for the
heads up on the MS Knowledge Base sites. Goes a long way to boosting my
knowledge of Chkdsk.........Regards. deango
 
R

Rock

deango said:
Thanks Andrew E and Dixonion 69 for clarifying Defrag and Chkdsk. I was
stupid not to realize 'R' represented repair. And thanks to Rock for the
heads up on the MS Knowledge Base sites. Goes a long way to boosting my
knowledge of Chkdsk.........Regards. deango

You're welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top