Microsoft DOS diskcomp command

Updated: 11/10/2017 by Computer Hope

About diskcomp

Compares the contents of a floppy disk in the source drive to the contents of a floppy disk in the target drive.


The diskcomp command is an external command and is available in the below Microsoft operating systems as

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.

MS-DOS 1.0 to 6.22
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
Windows 10

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 floppies that are the identical 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.