Author Topic: Run Check Disk from a Command Line to Check for and fix Disk Errors  (Read 3842 times)

0 Members and 1 Guest are viewing this topic.

Offline Nick

  • Administrator
  • Platinum Member
  • *
  • Posts: 46028
  • Karma: +1000/-0
  • Gender: Male
  • NickCS
    • http://www.facebook.com/nickcomputerservices
    • http://www.twitter.com/nickcomputer
    • Computer Chiangmai

Run Check Disk from a Command Line to Check for and fix Disk Errors

You should periodically use the Check Disk tool to check the integrity of disks. Here's an overview of running Check Disk from a command line.


You should periodically use the Check Disk tool to check the integrity of disks. Check Disk examines disks and can correct many types of common errors on FAT16, FAT32, and NTFS drives. One of the ways Check Disk locates errors is by comparing the vol¬ume bitmap with the disk sectors assigned to files in the file system. Check Disk can’t repair corrupted data within files that appear to be structurally intact, however. You can run Check Disk from the command line or through a graphical interface.

Running Check Disk from the Command Line
You can run Check Disk from an elevated command prompt or within other tools. At the elevated command prompt, you can test the integrity of drive C by typing the following command:
chkdsk C:

Check Disk then performs an analysis of the disk and returns a status message regarding any problems it encounters.Unless you specify further options, Check Disk won’t repair problems, however.To find and repair errors on drive C, use this command:
chkdsk /f C:

When you use this command, Check Disk performs an analysis of the disk and then repairs any errors it finds, provided that the disk isn’t in use. If the disk is in use, Check Disk displays a prompt that asks whether you want to schedule the disk to be checked the next time you restart the system. Click Yes to schedule this check.

The complete syntax for Check Disk is as follows:
CHKDSK [volume[[path]filename]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]

The options and switches for Check Disk are used as follows:
volume Sets the volume to work with
path/filename Specifies files to check for fragmentation (FAT16 and FAT32 only)
/F Fixes errors on the disk
/V Displays the full path and name of every file on the disk (FAT16 and FAT32); displays cleanup messages if any (NTFS)
/R Locates bad sectors and recovers readable information (implies /F)
/X Forces the volume to dismount first if necessary (implies /F)
/I Performs a minimum check of index entries (NTFS only)
/C Skips checking of cycles within the folder structure (NTFS only)
/L:size Sets the log file size (NTFS only)
/B Re-evaluates bad clusters on the volume (NTFS only; implies /R)


From the Microsoft Press book Windows 7 Administrator’s Pocket Consultant by William R. Staneck.


Looking for More Tips?


For more tips on Windows 7 and other Microsoft technologies, visit the TechNet Magazine Tips library.



credit: technet.microsoft.com


 
Share this topic...
In a forum
(BBCode)
In a site/blog
(HTML)


Related Topics

  Subject / Started by Replies Last post
0 Replies
3858 Views
Last post February 16, 2009, 06:37:12 PM
by Webmaster
0 Replies
3418 Views
Last post February 16, 2009, 06:56:00 PM
by Webmaster
0 Replies
10915 Views
Last post March 08, 2009, 01:03:45 PM
by IT
0 Replies
27248 Views
Last post April 27, 2009, 03:36:17 PM
by IT
0 Replies
3583 Views
Last post June 11, 2010, 06:31:21 PM
by Nick
0 Replies
3395 Views
Last post June 11, 2010, 07:03:17 PM
by Nick
0 Replies
4413 Views
Last post June 11, 2010, 07:08:51 PM
by Nick
0 Replies
3036 Views
Last post June 16, 2010, 09:45:08 PM
by Nick
0 Replies
3327 Views
Last post July 02, 2010, 03:00:20 PM
by Nick
0 Replies
6706 Views
Last post July 02, 2012, 05:21:53 PM
by Nick