MS-DOS and Windows command line diskcomp command

Updated: 04/02/2019 by Computer Hope
diskcomp command

The diskcomp command compares the contents of a floppy disk in the source drive to the contents of a floppy disk in the target drive.

Availability

Diskcomp is an external command and is available for the following Microsoft operating systems as diskcomp.com.

Note

This command was not included with Microsoft Windows 95, Windows 98, or Windows ME. However, if you upgraded Windows 95 from Windows 3.x, this file would still be available.

Diskcomp syntax

Windows 2000, XP, Vista, 7, and 8 syntax

Compares the contents of two floppy disks.

DISKCOMP [drive1: [drive2:]]

Early versions of MS-DOS Syntax

DISKCOMP Source: Target: /1 /8

Source: Source drive containing one of the floppy disks to be compared.
Target: Target drive containing the other disk to be compared.
/1 Compares only the first side of the disks.
/8 Compares the first 8 sectors per track.

Diskcomp examples

diskcomp a: b: /1

Compares the first side of A: with B:

Additional information

This command cannot be used with a hard drive and must be only used with floppy diskettes that are identical in size.

The diskcomp exit codes are:

0 - Disks are the same.
1 - Disks are different.
2 - Process aborted with Ctrl+C by user.
3 - Critical error.
4 - Initialization error.