This information is based on a document that has been very kindly contributed by Mattias Paul as a list of exitcodes for the different versions of DOS utilities, and should be kept as reference for the exitcodes. Translation into English by Eric Auer (who added the initial color coding).
| Program
|
| Exit code
| Meaning
|
| ASSIGN
| Novell DOS 7, Caldera OpenDOS? 7.01
| 0
| success / help
|
| 3
| aborted by user (e.g. Ctrl-C)
|
| 4
| syntax error
|
| ATTRIB
| MS-DOS 5.0+, Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success (DR DOS 6.0, too?) Novell DOS 7: also "file not found"
|
| 1
| MS-DOS: file not found / syntax error
|
| 3
| MS-DOS: aborted (DR DOS 6.0, too?)
|
| 31
| Novell DOS 7+: invalid option or aborted by user
|
| APPEND
| Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success
|
| 3
| aborted by user
|
| BACKUP
| MS-DOS 2.1+, DR DOS 6.0, CCI Multiuser DOS 7.x, Novell DOS 7, Caldera OpenDOS 7.01, PC-DOS 7, OS/2 2.0+
| 0
| success
|
| 1
| no files to backup
|
| 2
| some files not backup up, access denied or sharing violation
|
| 3
| aborted by user
|
| 4
| aborted because of error
|
| 5
| OS/2 2.0+: reserviert (?reserved?)
|
| 6
| OS/2 2.0+: could not FORMAT disk
|
| COMP
| Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success (even if no target file found or file sizes differ!)
|
| 3
| aborted by user
|
| 4
| no files or source file not found or syntax error
|
| OS/2 2.0+
| 0
| success
|
| 1
| no files found for comparison
|
| 2
| some files or directories could not be processed, file error
|
| 3
| aborted by user
|
| 4
| aborted because of error
|
| 5
| files were different
|
| CHOICE
| MS-DOS 6.?+, PC-DOS 7, Novell DOS 7, Caldera OpenDOS 7.01
| X
| depends on user's keypress
|
| CHKDSK
| MS-DOS 6.2+, CCI Multiuser DOS 7
| 0
| drive found to be okay
|
| 1
| MS-DOS: could not check disk because files are open
|
| 255
| error found on drive
|
| OS/2 2.0+
| 0
| drive found to be okay
|
| 1
| reserved
|
| 2
| reserved
|
| 3
| aborted by user
|
| 4
| aborted because of error
|
| 5
| reserved
|
| 6
| CHKDSK could not load module for this filesystem type
|
| DEFRAG
| MS-DOS 6.2+, PC-DOS 7
| 0
| defragmentation successful
|
| 1
| internal error
|
| 2
| no clusters free (need at least 1)
|
| 3
| aborted by user
|
| 4
| general error
|
| 5
| error when reading a cluster
|
| 6
| error when writing a cluster
|
| 7
| FAT error, use scandisk to correct
|
| 8
| memory error
|
| 9
| out of memory
|
| DELTREE
| MS-DOS 6.2+
| 0
| success
|
| ?
| no success
|
| DELWATCH
| Novell DOS 7, Caldera OpenDOS 7.01 (DELWATCH 2.1)
| 0
| success
|
| >27
| in combination with /MBL: value is n+27 for /F:n option, default 20+27 for floppy or 200+27 for harddisk (maximum number of files in delete-tracking queue).
|
| DISKCOMP
| MS-DOS 4.0+, DR DOS 6.0, Novell DOS 7, Caldera OpenDOS 7.01, PC-DOS 7, OS/2 Warp 3
| 0
| disks are identical
|
| 1
| disks differ for all except OS/2 and MS-DOS 4.x: did not compare (syntax error or invalid drive specified)
|
| 2
| aborted by user
|
| 3
| hardware error, did not compare
|
| 4
| initialization error, out of memory, invalid drive or syntax
|
| DISKCOPY
| MS-DOS 4.0+, Novell DOS 7, Caldera OpenDOS 7.01, PC-DOS 7, OS/2 Warp 3
| 0
| success (copy done)
|
| 1
| corrected read/write error MS-DOS 5.0: invalid drive or syntax error
|
| 2
| aborted by user
|
| 3
| fatal disk access error: cannot read source / cannot format target
|
| 4
| initialization error, out of memory, invalid drive or syntax
|
| DOSBOOK
| Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success
|
| 31
| syntax error
|
| DPMI
| Novell DOS 7, Caldera OpenDOS 7.01
| 0
| state changed
|
| 1
| called without parameters and DPMI not active (else 0 returned)
|
| EAUTIL
| OS/2 2.0+
| 0
| success
|
| 1
| no files found to save
|
| 4
| aborted becasue of error
|
| EDIT
| Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success
|
| 3
| aborted by user
|
| 4
| syntax error
|
| FASTOPEN
| MS-DOS 5.0+, DR DOS 6.0, Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success (always returned for Novell DOS 7 and DR DOS 6.0)
|
| 1
| syntax error (not returned for Novell DOS 7 and DR DOS 6.0: FASTOPEN is only a dummy command there!)
|
| FC
| Novell DOS 7, Calder OpenDOS 7.01
| 0
| success or help, no matter if files same or different!
|
| 1
| files(s) not found or syntax error
|
| 3
| aborted by user
|
| FDISK
| Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success
|
| 3
| aborted by user
|
| FIND
| MS-DOS 5.0+, Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success, MS-DOS 6.2 also: found string, Novell DOS and Caldera OpenDOS 7.01 also: no files to be processed
|
| 1
| MS-DOS: success, but no match
|
| 2
| MS-DOS: syntax error
|
| 31
| Novel DOS 7: aborted by user, syntax error or no string given
|
| FORMAT
| MS-DOS 4.0+, Novell DOS 7, Caldera OpenDOS 7.01, PC-DOS 7, OS/2 2.0+
| 0
| success
|
| 3
| aborted by user
|
| 4
| fatal error, disk broken or wrong name
|
| 5
| harddisk format confirmation not given (user selected "no")
|
| OS/2 2.0+
| 6
| FORMAT could not find the module for that filesystem type
|
| 7
| drive not supported by module for that filesystem type
|
| GRAFTABL
| MS-DOS 4.0+, 0S/2 2.0+, Novell DOS 7, Caldera OpenDOS 7.01
| 0
| success: loaded with new codepage (no codepage loaded previously)
|
| 1
| replaced table by new one (loaded new codepage into existing TSR)
|
| 2
| Novell, MS-DOS 4.0+: file error OS/2 2.0+: no codepage was ??? and will be loaded
|
| 3
| syntax error, nothing done
|
| 4
| wrong DOS version
|
| ISWINDOW
| OS/2 Warp 3
| 0
| DOS-Session is in fullscreen mode
|
| 1
| DOS-Session running in a window
|
| JOIN
| MS-DOS 5.0+
| 0
| success
|
| 1
| syntax error
|
Novell DOS 7, Caldera OpenDOS 7.01
| 1
| cannot make JOIN directory
|
| 3
| aborted by user
|
| 32
| displayed the JOIN list
|
| 43
| error
|
| 255
| successfully assigned...
|
| XCOPY
| MS-DOS 3.2+, Caldera OpenDOS 7.01
| 0
| success
|
| 1
| no files found to copy
|
| 2
| CTRL-C was pressed to terminate XCOPY
|
| 4
| initialization error; not enough memory or disk space, or invalid drive name or syntax on command line
|
| 5
| disk write error
|
| XDEL
| DR-DOS 6+, Novel DOS 7, Caldera OpenDOS 7.01
| 0
| success
|
| 1
| syntax error
|
| 2
| error deleting file
|
| 3
| insufficient memory
|