Microsoft DOS Draft for Information Only
ContentMS DOS Command: SCANDISK.EXE
MS DOS Command: SCANDISK.EXEReference from Microsoft MS-DOS cmd help DescriptionStarts 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. SyntaxTo check the current drive for disk errors, use the following syntax: SCANDISK
To check one or more drives for disk errors, use the following syntax: SCANDISK [drive: [drive: ...]|/ALL] [/CHECKONLY | /AUTOFIX [/NOSAVE] | /CUSTOM] [/SURFACE] [/MONO] [/NOSUMMARY]
To check an unmounted compressed volume file for errors, use the following syntax: SCANDISK volume-name [/CHECKONLY | /AUTOFIX [/NOSAVE] | /CUSTOM] [/MONO] [/NOSUMMARY]
To check a file or files for fragmentation, use the following syntax: SCANDISK /FRAGMENT [drive:][path]filename
To undo repairs you made previously, use the following syntax: SCANDISK /UNDO [undo-drive:] [/MONO]
Parameters
Switches
RemarksProblems fixed by ScanDiskScanDisk checks and fixes problems in the following areas of each drive:
In addition, ScanDisk also checks and fixes the following areas of a DriveSpace or DoubleSpace compressed drive:
Types of drivesScanDisk can find and fix errors on the following types of drives:
ScanDisk cannot find or fix errors on the following types of drives:
Using ScanDisk when other programs are runningDo 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, MS-DOS 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 MS-DOS 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. Using ScanDisk with PC-DOS 6.1Do not run ScanDisk on any PC-DOS 6.1 compressed drive. If you do, you will lose all data on that drive. ScanDisk is compatible only with MS-DOS compressed drives (DriveSpace drives and DoubleSpace drives) and is not designed to run on PC-DOS compressed drives. Using ScanDisk on DoubleSpace DrivesIf 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 the README.TXT file. (For more information about using DoubleSpace with MS-DOS 6.22, see DBLSPACE.) The SCANDISK.INI fileThe SCANDISK.INI file is a text file located in the directory that contains your MS-DOS 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. Undoing the changes ScanDisk madeIf 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. ScanDisk ErrorlevelsWhen ScanDisk returns to the command prompt, it sets ERRORLEVEL to one of the following:
ExamplesTo check and fix the current drive, type the following: scandisk 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 following: scandisk c:\DRVSPACE.000 The DriveSpace volume file must be located in the root directory of the drive. To check both drive C and drive E, type the following: scandisk c: e: To check all your drives, type the following: scandisk /all 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 the following: scandisk /undo a: ©sideway ID: 110700252 Last Updated: 7/30/2011 Revision: 0 Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019