首页 > 编程 > BAT > 正文

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

2020-06-09 14:23:42
字体:
来源:转载
供稿:网友

ATTRIB.EXE
(a) Target file/folder not found                    = ERRORLEVEL 1
(b) Invalid switch                                  = ERRORLEVEL 1
(c) Sharing violation (target file in use)          = ERRORLEVEL 1
(d) Invalid drive specification                     = ERRORLEVEL 1
(e) Drive not ready (either Abort or Fail reply)    = ERRORLEVEL 1
(f) Invalid/wrong number of parameters              = ERRORLEVEL 1

EXTRACT.EXE
(a) Invalid switch                                  = ERRORLEVEL 1

FC.EXE
(a) Insufficient number of filespecs                = ERRORLEVEL 1
(b) Too many filenames on command line              = ERRORLEVEL 1
(c) Sharing Violation + Abort reply                 = ERRORLEVEL 5
     (Note: Fail reply returns ERRORLEVEL 0)
(d) Drive not ready                                 = ERRORLEVEL 18
     (Note: Fail reply returns ERRORLEVEL 0)

FIND.EXE
(a) Target string found    (=f0und)                  = ERRORLEVEL 0
(b) Target string missing (=m1ssing)                = ERRORLEVEL 1
(c) find /?                                         = ERRORLEVEL 1
(d) Parameter format not correct                    = ERRORLEVEL 2
(e) Specified file to search not found              = ERRORLEVEL 2
(f) Specified file in use + Fail reply              = ERRORLEVEL 2
(g) Drive not ready + Fail reply                    = ERRORLEVEL 2

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表