Commodore PC Ms-Dos 3.2 User's Manual page 121

Table of Contents

Advertisement

MS-DOS Commands 49 |
If you type Y, diskcomp prompts you to insert the proper disks
and does the next comparison. If you type TV, diskcomp ends. If
-^
the disk in the default drive does not contain ms-dos and -you end
f
diskcomp, you'll receive the following message:
Insert
disk
with
COMMAND.COM
in
drive
A
/"*\
and
strike
any
key
when
ready
Diskcomp does not work on network drives, and you cannot use
/-—s
it with assigned, joined, or substituted drives. If you attempt to
use the diskcomp command with these types of drives, it displays
an error message.
n
Note
When comparing a disk with a backup disk that you made
with the copy command, you may receive the "Compare error"
f*^
message, even if the files on the disks are identical. This is
because the copy command duplicates the information, but
doesn't necessarily place it in the same location on the target disk.
>-*k
In this case, you should use the FC utility to compare individual
'
}
files on the disk. See Chapter 8, "File Comparison Utility (FC)."
f0^
When correctly written programs exit back to ms-dos, they return
Diskcomp exit codes
an exit code: 0 if no error occurred, or a value greater than zero
if there was a problem. This exit code can be tested in batch files,
f~\
and it allows batch programmers to "branch" to an error-handling
routine in the batch file.
The diskcomp command returns the following exit codes:
'
0
Compared OK
The disks compared exactly.
>—v
1
Did not compare
The disks were not the same.
2
control-c error
^-s.
The user terminated with control-C.
3
Hard error
An unrecoverable read or write error occurred — did
s~*.
not compare.
4
Initialization error
There is not enough memory — invalid drives or com-
^m.
mand line syntax.
You can use the batch processing if command to perform error
f~*\
processing based on the errorlevel returned by diskcomp.

Advertisement

Table of Contents
loading

Table of Contents