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

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)

时间: 2024-10-28 16:02:47

dos中一些常用命令的errorlevel返回值_DOS/BAT的相关文章

Java Web Start学习,与JDK中keytool常用命令

Java Web Start(以下简称JWS)是SUN提供的一种通过Web来部署和发布Java 程序的新技术,它既可以用来发布Application,也可以用来发布Applet,它获去年全球Java技术最佳创意奖.它仅在第一次运行时下载程序,以后的事情,就全全交给JWS,包括版本的自动更新和维护.这是我们曾经梦寐以求的事情,程序运行在客户端(本地运行,当然有足够的速度),但不用去安装配置客户端,也不用去考虑版本升级后对客户端的维护,这就是JWS提供给我们的好处之一.OK,下面我们就来看看如何玩转

在ASP中执行Ping命令,并且返回结果

执行 在ASP中执行Ping命令,并且返回结果 在Win2000系统中,可以通过Wscript.Shell对象的Exec方法执行命令, 简单的代码如下: <% Response.Buffer = true %> <% url = "www.topronet.com" Set objWShell = CreateObject("WScript.Shell") Set objCmd = objWShell.Exec("ping "

在Word 2010“快速访问工具栏”中添加常用命令

在Word 2010左上方有一个浮动的工具栏,被称为快速访问工具栏.快速访问工具栏允许用户将最常使用的命令或按钮添加到此处,同时也是Word 2010窗口中唯一允许用户自定义的窗口元素.在Word 2010快速访问工具栏中已经集成了多个常用命令,默认情况下并没有被显示出来.用户可以通过以下方法将常用命令显示在快速访问工具栏中: 打开Word 2010窗口,单击快速访问工具栏右侧的下拉三角按钮,打开"自定义快速访问工具栏"菜单,选中需要显示的命令即可,如图2009113001所示. 图2

Node.js中npm常用命令大全_node.js

npm是什么 NPM的全称是Node Package Manager,是随同NodeJS一起安装的包管理和分发工具,它很方便让JavaScript开发者下载.安装.上传以及管理已经安装的包. npm install 安装模块 基础语法 npm install (with no args, in package dir) npm install [<@scope>/]<name> npm install [<@scope>/]<name>@<tag>

Java或C#调用命令行批处理命令如何获得返回值

@echo off dump -uroot -p1234 --database gbase > 1.sql 2>Nul if %errorlevel%==0 goto next goto error :next echo OK goto end :error echo ERROR :end   [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]   先看看如上的批处理,其中一个命令是dump,其它的参数我们就不说了.2个点 > 1.sql 这个是默认的输出,也就是内容输出 2

bat中errorlevel与%errorlevel%的区别_DOS/BAT

他们都是判断上个命令的返回值.当使用if errorlevel 值 cmmand 句式时,它的含义是:如果返回的错误码值大于或等于值 的时候,将执行cmmand 操作: 当使用if %errorlevel%==值 cmmand 句式时,它含义是:如果返回的错误码值等于值 的时候,将执行cmmand操作. 一般上一条命令的执行结果返回的值只有两个,"成功"用0 表示 "失败"用 1 表示,实际上,errorlevel 返回值可以在0~255 之间, 例如xcopy 默

javascript-谷歌:CEF3中,c++调用JS的返回值获取问题?

问题描述 谷歌:CEF3中,c++调用JS的返回值获取问题? 谷歌:CEF3中,c++调用JS的返回值怎么获取?直接执行ExecuteJavascript获取不到返回值,请大神们指教!谢谢! 解决方案 不能用同步方式阻塞结果,而应该用异步方式 class CefV8AsyncResult{ void Success(CefRefPtr<CefV8Value> result void* user_data) =0; void Error(CefRefPtr<CefV8Value> e

引用返回值 引用形参-在C++中,很简单的引用返回值函数,可以返回两个引用的相加和吗

问题描述 在C++中,很简单的引用返回值函数,可以返回两个引用的相加和吗 #include using namespace std; void main() { int& sum(int &a,int& b); int a=1,b=2; sum(a,b)+=1; } int &sum(int & a,int & b) { return a+b; } 在VC6.0中编译出错error C2440: 'return' : cannot convert from

线程中的回调函数如何获得返回值,请高手开悟,在线等......

问题描述 普通回调方法:classA{classBxx=newclassB();stringss=k.ca(tm);stringtm(stringxm){returnxm+"一杯醉倒";}}classB{publicdelegatestringtc();publicstringca(tcmm){MessageBox.Show("到这里了!");returnmm("我");}}执行stringss=k.ca(tm);语句后,得到回调函数tm的返回值