dos中一些常用命令的errorlevel返回值

2019-01-30 01:15:09王冬梅

     (Note: Fail reply - unusually - returns ERRORLEVEL 1)

TRACERT.EXE
(a) Unable to resolve target system name            = ERRORLEVEL 1
     (usually=name not found on DomainNameServer)
(b) Invalid switch                                  = ERRORLEVEL 1
(c) Brief help (no parameter)                       = ERRORLEVEL 1
(d) Interrupted with [Ctrl-C]                       = ERRORLEVEL 255
Note: for TRACERT Brief help, type command without parameters

XCOPY.EXE
(a) File not found                                  = ERRORLEVEL 1
(b) Invalid date in /d switch                       = ERRORLEVEL 4
(c) Invalid number of parameters                    = ERRORLEVEL 4
(d) Invalid parameter                               = ERRORLEVEL 4
(e) Device not ready                                = ERRORLEVEL 4
(f) Unable to create directory                      = ERRORLEVEL 4
(g) System can't find file                          = ERRORLEVEL 5
     (this occurs when device such as NUL is used as Source file)

您可能感兴趣的文章:

cmd if条件 条件判断dos if 条件判断bat批处理 if 命令示例详解bat If 命令常用判断介绍bat中errorlevel与%errorlevel%的区别IF-ERRORLEVEL使用方法
相关文章 大家在看