Windows Vista comes with an disk error checking tool, called CHKDSK (sometimes called scandisk in older versions of Windows). This allows you to scan, check and repair and errors that may be present on your hard drive.
This will sometimes run automatically if Vista fails to shutdown correctly, but you can also run it yourself (either graphically or from the command line). If you wish to check your main boot drive, you will need to restart and perform the scan before Vista loads (which it will prompt you to do automatically).
To start the graphical disk checking tool, load up "Computer" from the start menu to view all your drives:
You can now right click on one of your drive icons and click Properties:
Then click on the Tools tab, followed by Check Now (located under "Error Checking"):
This will load the disk checking tool, allowing you select the starting options. It is always recommended that you leave the first box ticked (Automatically fix file system errors), as this will correct any problems found. If you wish to do a more thorough test, tick the 2nd box (Scan for and attempt recovery of bad sectors). It is recommended that you perform this test if you suspect there are drive problems, rather than a routine scan. Once you have configured the scan, click Start:
If you are prompted with "Windows can't check the disk while it's in use", this means you will need to allow windows to perform the scan on the next boot-up:
Command Line Utility
If you wish to use the command line version of CHKDSK, use the command "chkdsk". The full command line switches are listed below:
CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] volume Specifies the drive letter (followed by a colon), mount point, or volume name. filename FAT/FAT32 only: Specifies the files to check for fragmentation . /F Fixes errors on the disk. /V On FAT/FAT32: Displays the full path and name of every file on the disk. On NTFS: Displays cleanup messages if any. /R Locates bad sectors and recovers readable information (implies /F). /L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size. /X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F). /I NTFS only: Performs a less vigorous check of index entries. /C NTFS only: Skips checking of cycles within the folder structure. /B NTFS only: Re-evaluates bad clusters on the volume (implies /R) The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.