Starts Microsoft ScanDisk, a disk analysis and repair tool that checks a drive for errors and corrects any problems that it finds. For an introduction to using ScanDisk, see An Introduction to ScanDisk.
To check the current drive for disk errors:
To check one or more drives for disk errors:
SCANDISK [drive: [drive: ...] | /ALL] [/CHECKONLY | /AUTOFIX [/NOSAVE] | /CUSTOM] [/SURFACE] [/MONO] [/NOSUMMARY] [/CLIP] [/HELP] [/MOUNT] [/NEW] [/NOLOST] [/NOUI] [/TEXT] [/TIME]
To check an unmounted compressed volume file for errors:
SCANDISK volume-name [/CHECKONLY | /AUTOFIX [/NOSAVE] | /CUSTOM] [/MONO] [/NOSUMMARY]
To check a file or files for fragmentation:
SCANDISK /FRAGMENT [drive:][path]filename
To undo repairs you made previously:
SCANDISK /UNDO [undo-drive:] [/MONO]
ScanDisk checks and fixes problems in:
In addition, ScanDisk also checks and fixes DriveSpace or DoubleSpace compressed drive:
ScanDisk can find and fix errors on:
ScanDisk cannot find or fix errors on:
Do not use ScanDisk to repair a drive when other programs are running. ScanDisk is designed for use when files on a disk are in an unchanging state. When you are using a file, the operating system updates the file allocation table (FAT) and the directory structure to reflect changes. Such updates are not always made immediately. If you run ScanDisk when other programs are running, files might still be open. ScanDisk interprets differences between the directory structure and the file allocation tables as errors. This can result in corruption or loss of data.
You cannot use ScanDisk to correct disk errors if you start it from another program, or when Microsoft Windows or the operating system Task Swapper are running. However, you can check your disk without fixing errors by using the SCANDISK command with the /CHECKONLY switch. If you run it with Windows, ScanDisk might detect errors that do not exist when Windows is not running.
Do not run ScanDisk on any (PCDOS6.10) compressed drive. If you do, you will lose all data on that drive. ScanDisk is compatible only with the operating system compressed drives (DriveSpace drives and DoubleSpace drives) and is not designed to run on PC-DOS compressed drives.
If DoubleSpace is installed (that is, if DBLSPACE.BIN is loaded into memory), ScanDisk can check and repair DoubleSpace drives and unmounted DoubleSpace compressed volume files. ScanDisk can also check and repair DoubleSpace drives and volume files if the DBLSPACE.BIN and DRVSPACE.MR1 files are available. Otherwise, ScanDisk does not work on DoubleSpace drives or unmounted DoubleSpace compressed volume files. For more information about the DRVSPACE.MR1 file, see DBLSPACE--Notes. (For more information about using DoubleSpace with v6.22, see DBLSPACE.)
The SCANDISK.INI file is a text file located in the directory that contains your operating system files. The settings in the [Environment] section of the SCANDISK.INI file determine certain aspects of ScanDisk's behavior, such as whether it is configured for a monochrome or color display. The settings in the [Custom] section determine the default behavior of ScanDisk when you start it with the /CUSTOM switch.
For more information, read the comments in the SCANDISK.INI file.
If ScanDisk finds errors on your drive, the program gives you the option of creating an Undo disk, which enables you to undo the changes ScanDisk makes to your drive. The Undo disk contains information that specifies which drive it applies to as well as information on every change that ScanDisk made to that drive.
CAUTION: Use the Undo disk to undo changes only if your drive has not changed since that Undo disk was created. If you changed any of the files on your drive since you created the Undo disk, do not try to undo your changes. If you attempt to use the Undo disk after you update a file or directory, or copy or delete a file, you might damage your drive structure and lose data.
To check and fix the current drive, type:
Suppose that DriveSpace is installed, but is unable to mount your compressed drive because of problems with the drive. The drive's compressed volume file is called DRVSPACE.000 and is located in the root directory of drive C. To repair the volume file, type:
The DriveSpace volume file must be located in the root directory of the drive.
To check both drive C and drive E, type:
SCANDISK C: E:
To check all your drives, type:
This will check all your hard disk partitions, in addition to all mounted DriveSpace drives (if DriveSpace is installed).
Suppose you created an Undo disk, did not change the contents of the checked drive since you created the Undo disk, and placed the Undo disk in drive A. To undo the changes made by ScanDisk, type:
SCANDISK /UNDO A:
ScanDisk is a full-featured disk analysis and repair program. It is designed to work on both uncompressed drives and compressed drives.
To start ScanDisk, type:
ScanDisk begins checking the current drive. If ScanDisk finds any problems, it displays a dialog explaining the problem.
To check a specific drive, type the drive letter after the ScanDisk command. For example, to check drive D, type:
If ScanDisk doesn't find any problems with your drive, you don't have to do much. Just let it run, and when it completes, choose the Exit button at the bottom of the screen by typing X or by clicking Exit with the mouse.
If ScanDisk finds a problem, it displays a Problem Found dialog that briefly explains the problem and what will happen if you fix it. Most Problem Found dialogs have a Fix It button, a Don't Fix It button, and a More Info button. To have ScanDisk correct the problem, choose the Fix It button.
Most ScanDisk screens and dialogs include a More Info button. This displays another dialog with more information -- usually additional technical details -- about the current screen. For some types of problems, the More Info dialog lists the names of affected files.
If you run ScanDisk on a mounted or unmounted compressed drive, it offers to check the host (physical) drive first. In general, you should allow it to do so, since an error on the host drive could cause problems with the compressed drive.
Note: To run ScanDisk on a DoubleSpace compressed drive, DoubleSpace must either be installed (DBLSPACE.BIN loaded in memory) or the files DBLSPACE.BIN and DRVSPACE.MR1 must be available. For more information about using DoubleSpace with v6.22, see DBLSPACE. For more information about the DRVSPACE.MR1 file, see DBLSPACE--Notes.
If ScanDisk finds a problem and you choose Fix It, ScanDisk offers to create an Undo floppy disk that you can later use to restore your disk to its previous state. You can restore your disk's previous state only if you haven't changed it since making repairs. Creating an Undo disk is easy -- you just insert a blank, formatted floppy disk in drive A or drive B, and then choose the Drive A or Drive B button in the dialog ScanDisk displays.
The SCANDISK.INI file contains settings that determine many aspects of ScanDisk's behavior. Most of the settings determine how ScanDisk will behave if you start it with the /CUSTOM switch. You can also use the settings in SCANDISK.INI to control other aspects of ScanDisk's behavior; for example, to prevent ScanDisk from prompting you for an Undo disk, just change the Undo setting in SCANDISK.INI to "Never". For more information about SCANDISK.INI, see the comments within the file.