Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

diskcomp

Feedback

In this article

Compares the contents of two floppy disks. If used without parameters,diskcomp uses the current drive to compare both disks.

Syntax

diskcomp [<drive1>: [<drive2>:]]

Parameters

ParameterDescription
<drive1>Specifies the drive containing one of the floppy disks.
/?Displays help at the command prompt.

Remarks

  • Thediskcomp command works only with floppy disks. You cannot usediskcomp with a hard disk. If you specify a hard disk drive fordrive1 ordrive2,diskcomp displays the following error message:

    Invalid drive specificationSpecified drive does not existor is nonremovable
  • If all tracks on the two disks being compared are the same (it ignores a disk's volume number),diskcomp displays the following message:

    Compare OK

    If the tracks aren't the same,diskcomp displays a message similar to the following:

    Compare error onside 1, track 2

    Whendiskcomp completes the comparison, it displays the following message:

    Compare another diskette (Y/N)?

    If you pressY,diskcomp prompts you to insert the disk for the next comparison. If you pressN,diskcomp stops the comparison.

  • If you omit thedrive2 parameter,diskcomp uses the current drive fordrive2. If you omit both drive parameters,diskcomp uses the current drive for both. If the current drive is the same asdrive1,diskcomp prompts you to swap disks as necessary.

  • If you specify the same floppy disk drive fordrive1 anddrive2,diskcomp compares them by using one drive and prompts you to insert the disks as necessary. You might have to swap the disks more than once, depending on the capacity of the disks and the amount of available memory.

  • Diskcomp can't compare a single-sided disk with a double-sided disk, nor a high-density disk with a double-density disk. If the disk indrive1 isn't of the same type as the disk indrive2,diskcomp displays the following message:

    Drive types or diskette types not compatible
  • Diskcomp doesn't work on a network drive or on a drive created by thesubst command. If you attempt to usediskcomp with a drive of any of these types,diskcomp displays the following error message:

    Invalid drive specification
  • If you usediskcomp with a disk that you made by usingcopy,diskcomp might display a message similar to the following:

    Compare error onside 0, track 0

    This type of error can occur even if the files on the disks are identical. Althoughcopy duplicates information, it doesn't necessarily place it in the same location on the destination disk.

  • diskcomp exit codes:

    Exit codeDescription
    0Disks are the same
    1Differences were found
    3Hard error occurred
    4Initialization error occurred

    To process exit codes that are returned bydiskcomp, you can use theERRORLEVEL environment variable on theif command line in a batch program.

Examples

If your computer has only one floppy disk drive (for example, drive A), and you want to compare two disks, type:

diskcomp a: a:

Diskcomp prompts you to insert each disk, as needed.

To illustrates how to process adiskcomp exit code in a batch program that uses theERRORLEVEL environment variable on theif command line:

rem Checkout.bat compares the disks in drive A and Becho offdiskcomp a: b:if errorlevel 4 goto ini_errorif errorlevel 3 goto hard_errorif errorlevel 1 goto no_compareif errorlevel 0 goto compare_ok:ini_errorecho ERROR: Insufficient memory or command invalidgoto exit:hard_errorecho ERROR: An irrecoverable error occurredgoto exit:breakecho You just pressed CTRL+C to stop the comparisongoto exit:no_compareecho Disks are not the samegoto exit:compare_okecho The comparison was successful; the disks are the samegoto exit:exit

Related links


Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

  • Last updated on

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?