本帖最后由 chouxia 于 2015-4-22 14:07 编辑
代码如下- @echo off
- setlocal enabledelayedexpansion
- v:\run\echox -c 4f tttttt2
- echo ^@echo off>d:\111\333.bat
- echo v^:\run\sed ^-i s^/rendering^=2/rendering^=3^/g "d:\111\123.txt^">>d:\111\333.bat
- echo cd \log>>d:\111\333.bat
- echo dir>>d:\111\333.bat
- echo if ^%^ERRORLEVEL^% equ 0 (>>d:\111\333.bat
- echo timeout /t 2>>d:\111\333.bat
- echo v:\run\sed -i s/rendering^=3/rendering^=4/g d:\111\123.txt>>d:\111\333.bat
- echo exit) else (>>d:\111\333.bat
- echo v:\run\sed -i s/rendering^=3/rendering^=99/g d:\111\123.txt>>d:\111\333.bat
- echo exit>>d:\111\333.bat
- echo ^)>>d:\111\333.bat
- echo timeout /t ^2>>d:\111\333.bat
- echo cd \log>>d:\111\333.bat
- echo dir>>d:\111\333.bat
- echo if ^%^ERRORLEVEL^% equ 0 (>>d:\111\333.bat
- echo timeout /t 2>>d:\111\333.bat
- echo v:\run\sed -i s/rendering^=3/rendering^=4/g v:\1aep\!aepname!.txt>>d:\111\333.bat
- echo exit) else (>>d:\111\333.bat
- echo v:\run\sed -i s/rendering^=3/rendering^=99/g v:\1aep\!aepname!.txt>>d:\111\333.bat
- echo exit>>d:\111\333.bat
- echo ^)>>d:\111\333.bat
- echo timeout /t ^2>>d:\111\333.bat
- echo v^:\run\sed ^-i s^/rendering^=3/rendering^=4^/g "\\file\vdisk\1aep\!aepname!.txt^">>d:\111\333.bat
- echo exit>>d:\111\333.bat
- ::start \\file\udisk!inipath!\gqhecheng.bat
复制代码 我想请教的是为什么^%ERRORLEVEL^%没有输出到333.bat下?
附333.bat的内容- @echo off
- v:\run\sed -i s/rendering=2/rendering=3/g "d:\111\123.txt^"
- cd \log
- dir
- if equ 0 (
- v:\run\sed -i s/rendering=3/rendering=4/g d:\111\123.txt
- exit) else (
- v:\run\sed -i s/rendering=3/rendering=99/g d:\111\123.txt
- exit
- )
- timeout /t 2
- cd \log
- dir
- if equ 0 (
- v:\run\sed -i s/rendering=3/rendering=4/g v:\1aep\.txt
- exit) else (
- v:\run\sed -i s/rendering=3/rendering=99/g v:\1aep\.txt
- exit
- )
- timeout /t 2
- v:\run\sed -i s/rendering=3/rendering=4/g "\\file\vdisk\1aep\.txt"
- exit
复制代码
|