Force ScanDisk Surface Analysis in MS-DOS 6.22

In MS-DOS 6.22, the SCANDISK utility routinely prompts users before testing a drive's physical clusters, which interrupts automated scripts and unattended maintenance. To bypass this prompt and force the program to perform a thorough cluster inspection automatically, MS-DOS provides the /SURFACE command-line switch. This article explains the exact syntax, how the parameter functions, and how to combine it with other options for fully automated drive maintenance.

The /SURFACE Parameter

The parameter that forces SCANDISK to perform a surface analysis automatically is:

/SURFACE

By default, when you run SCANDISK on a drive, the utility checks the File Allocation Table (FAT), directory structure, file system integrity, and file allocation chains. Once these logical tests conclude, the program pauses and displays an interactive dialog box asking: "Do you want to perform a surface scan now?"

Adding the /SURFACE switch instructs SCANDISK to proceed directly into the physical surface test as soon as the file structure checks are complete, without waiting for user confirmation.

Command Syntax and Usage

To run a standard file check followed immediately by an automatic surface analysis on drive C:, use:

SCANDISK C: /SURFACE

Unattended Automated Scans

If your goal is to run SCANDISK entirely without user interaction—such as during startup via AUTOEXEC.BAT or inside a batch routine—combine /SURFACE with the /AUTOFIX switch:

SCANDISK C: /AUTOFIX /SURFACE
  • /AUTOFIX: Automatically repairs any logical disk errors (such as lost clusters or cross-linked files) without prompting you for a decision, and defaults to saving lost clusters as files.
  • /SURFACE: Ensures the physical bad sector scan begins immediately following the logical repairs without pausing for input.

If you do not want SCANDISK to convert lost clusters into .CHK files when automatically fixing errors during the scan, add the /NOSAVE switch:

SCANDISK C: /AUTOFIX /NOSAVE /SURFACE

How the Surface Scan Works

During the surface analysis phase, SCANDISK systematically reads every sector on the specified drive to detect physical defects. If the utility encounters a damaged or unreadable sector, it marks that cluster as "bad" in the File Allocation Table so MS-DOS will no longer attempt to write data to that physical location. If data already resides in the damaged cluster, SCANDISK attempts to read the data, relocates it to an undamaged cluster, and flags the defective area.