Board logo

标题: [文本处理] 判断文件是否存在的批处理哪里错,为什么不运行? [打印本页]

作者: winzip126    时间: 2014-5-30 16:56     标题: 判断文件是否存在的批处理哪里错,为什么不运行?

  1. if exist  "%userprofile%\desktop\1.exe" start c:\win7\11.exe
  2. if exist  "%userprofile%\desktop\3.exe" start c:\win7\33.exe
  3. if exist  "%userprofile%\desktop\2.exe" start c:\win7\22.exe
复制代码
哪里错了,只运行第一个,后面 的都不运行
作者: Batcher    时间: 2014-5-30 19:17

  1. if exist "%userprofile%\desktop\1.exe" start "" "c:\win7\11.exe"
  2. if exist "%userprofile%\desktop\3.exe" start "" "c:\win7\33.exe"
  3. if exist "%userprofile%\desktop\2.exe" start "" "c:\win7\22.exe"
  4. pause
复制代码
看看是否有报错信息




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2