代码之家  ›  专栏  ›  技术社区  ›  Programmer

如果选项以hypen开头,则批处理文件命令行参数解析错误

  •  0
  • Programmer  · 技术社区  · 7 年前

    start /wait %arg1%  -c %arg2%
    

    我得到一个错误窗口,说明:

    Windows cannot find '-c'. Make sure you typed the name correctly and try again
    

    我也从命令提示符下尝试:

    .\run.bat "c:\Project Work\bin\test.exe"  c:\config.ini
    ECHO is off. 
    The system cannot find the file -c.
    

    但是exe和ini文件都存在。

    即使在提示下运行:

    start /wait "c:\Project Work\bin\test.exe" -c c:\config.ini
    

    给出了同样的问题-

    0 回复  |  直到 7 年前
    推荐文章