Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the errorlevel return values of some commonly used commands in dos

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "what are the errorlevel return values of some commonly used commands in dos". In daily operation, I believe many people have doubts about the errorlevel return values of some commonly used commands in dos. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "what are the errorlevel return values of some commonly used commands in dos?" Next, please follow the editor to study!

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

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

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

FORMAT.COM

(a) Drive not ready = ERRORLEVEL 4

(There is no Abort, Retry, Fail stall)

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

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)

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)

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

SORT.EXE

(a) Invalid switch = ERRORLEVEL 1

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

(Note: Fail reply returns ERRORLEVEL 0)

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)

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)

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)

At this point, the study on "what are the errorlevel return values of some commonly used commands in dos" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report