文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

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

2023-06-08 12:19

关注

这篇文章主要介绍“dos中一些常用命令的errorlevel返回值有哪些”,在日常操作中,相信很多人在dos中一些常用命令的errorlevel返回值有哪些问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”dos中一些常用命令的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

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)

到此,关于“dos中一些常用命令的errorlevel返回值有哪些”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注编程网网站,小编会继续努力为大家带来更多实用的文章!

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     807人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     351人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     314人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     433人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     221人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯