码迷,mamicode.com
首页 > 其他好文 > 详细

errorlevel 续2

时间:2017-01-22 17:52:03      阅读:909      评论:0      收藏:0      [点我收藏+]

标签:host   har   attr   interrupt   cer   ftp   target   sort   evel   

-------siwuxie095

   

   

   

%ERRORLEVEL%值一览表:

   

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

   

win10下:

技术分享

   

   

   

   

CHOICE.EXE

(a) With reply list, and reply nn in list = ERRORLEVEL nn

(This reply list position = return code is main use of CHOICE)

(b) Invalid switch = ERRORLEVEL 255

(c) Invalid switch syntax = ERRORLEVEL 255

(d) Timeout default not in reply list = ERRORLEVEL 255

(e) choice /? = ERRORLEVEL 255

   

win10下:

技术分享

   

技术分享

   

   

   

   

CSCRIPT.EXE

(a) Cannot find script file = ERRORLEVEL 1

(b) No script engine for file extension = ERRORLEVEL 1

(c) No file extension in script file = ERRORLEVEL 1

(d) Drive not ready = ERRORLEVEL 1

(There is no Abort, Retry, Fail stall)

   

win10下:

技术分享

   

   

   

DELTREE.EXE

(a) Required parameter missing = ERRORLEVEL 1

(b) Invalid switch = ERRORLEVEL 1

(c) deltree /? = ERRORLEVEL 1

(d) Not ready reading drive (Abort reply) = ERRORLEVEL 18

(Note: Fail reply returns ERRORLEVEL 0)

   

win10下:

技术分享

   

   

   

   

EXTRACT.EXE

(a) Invalid switch = ERRORLEVEL 1

   

win10下:

技术分享

   

   

   

   

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)

   

win10下:

技术分享

   

技术分享

   

   

   

   

FIND.EXE

(a) Target string found (=found) = ERRORLEVEL 0

(b) Target string missing (=missing) = 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

(h) Specified file in use + Abort reply = ERRORLEVEL 5

(i) Drive not ready + Abort reply = ERRORLEVEL 5

   

win10下:

技术分享

   

   

   

   

   

FORMAT.COM

(a) Drive not ready = ERRORLEVEL 4

(There is no Abort, Retry, Fail stall)

   

win10下:

技术分享

   

技术分享

   

技术分享

   

   

   

   

   

FTP.EXE

(a) Brief help (use: ftp -h for Brief help) = ERRORLEVEL 2

(b) Error opening script file (file missing) = ERRORLEVEL 2

(c) Invalid switch = ERRORLEVEL 2

   

win10下:

技术分享

   

   

   

   

   

KEYB.COM

(a) Invalid switch = ERRORLEVEL 1

(b) Invalid keyboard code specified = ERRORLEVEL 1

(c) keyb /? = ERRORLEVEL 1

   

win10下:

技术分享

   

   

   

   

   

MEM.EXE

(a) Invalid switch = ERRORLEVEL 1

   

win10下:

技术分享

   

   

   

   

MODE.COM

(a) Invalid parameter = ERRORLEVEL 1

(b) Invalid switch = ERRORLEVEL 1

   

win10下:

技术分享

   

   

   

   

MORE.COM

(a) Invalid switch (MORE doesn‘t accept switches) = ERRORLEVEL 1

(b) Drive not ready (Abort reply) = ERRORLELEL 5

(Note: Fail reply returns ERRORLEVEL 0)

   

win10下:

技术分享

   

   

   

   

MOVE.EXE

(a) Required parameter missing = ERRORLEVEL 1

(b) Unable to create destination = ERRORLEVEL 1

(c) Unable to open source = ERRORLEVEL 1

(you see this when trying to MOVE a folder from one drive

to another. You need to use XCOPY /S followed by DELTREE,

since MOVE won‘t handle folder moves across drives)

(d) Sharing violation + Fail reply = ERRORLEVEL 1

(Note: file is nevertheless COPIED, not moved, in this case)

(e) Sharing violation + Abort reply = ERRORLEVEL 5

(Note: file is nevertheless COPIED, not moved, in this case)

(f) Drive not ready (Abort reply) = ERRORLEVEL 18

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

   

win10下:

技术分享

   

   

   

   

   

PING.EXE

(a) Unknown host = ERRORLEVEL 1

(usually=name not found on DomainNameServer)

(b) Brief help (with no parameter) = ERRORLEVEL 1

Note: for PING Brief help with /? switch, ERRORLEVEL is 0

(c) Invalid switch = ERRORLEVEL 1

(and displays the Brief help as well)

(d) Interrupted with [Ctrl-C] = ERRORLEVEL 255

   

win10下:

技术分享

   

   

   

   

SORT.EXE

(a) Invalid switch = ERRORLEVEL 1

(b) Drive not ready (Abort reply) = ERRORLEVEL 15

(Note: Fail reply returns ERRORLEVEL 0)

   

win10下:

技术分享

   

   

   

   

START.EXE

(a) start /? (real mode) = ERRORLEVEL 1

(b) start /? (GUI) = ERRORLEVEL 255

(c) Can‘t find file specified for START = ERRORLEVEL 255

(d) No file association for specified file = ERRORLEVEL 255

(e) Drive not ready = ERRORLEVEL 255

(There is no Abort, Retry, Fail stall)

   

win10下:

技术分享

   

   

   

   

   

SUBST.EXE

(a) Invalid parameter = ERRORLEVEL 1

(b) Invalid switch = ERRORLEVEL 1

(c) Path not found = ERRORLEVEL 1

(d) Drive not ready (Abort reply) = ERRORLEVEL 21

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

   

win10下:

技术分享

   

   

   

   

   

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

   

win10下:

技术分享

   

   

   

   

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

   

win10下:

技术分享

   

技术分享

   

技术分享

   

   

   

   

【made by siwuxie095】

   

   

   

   

   

   

   

   

   

   

errorlevel 续2

标签:host   har   attr   interrupt   cer   ftp   target   sort   evel   

原文地址:http://www.cnblogs.com/siwuxie095/p/6340766.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!