本帖最后由 chouxia 于 2014-10-28 08:12 编辑
代码如下:- @echo on
- setlocal enabledelayedexpansion
- cd v:\1aep
- for /f %%z in ('findstr /s /i /m "rendering=1" *.txt') do (
- for /f "tokens=1,* delims==" %%a in ('find "filenumber" ^< %%z') do ( set filenumber=%%b )
- for /f "tokens=1,* delims==" %%c in ('find "inipath" ^< %%z') do ( set inipath=%%d )
- for /f "tokens=1,* delims==" %%g in ('find "aepname" ^< %%z') do ( set aepname=%%h )
- ::echo NO. 0 !filenumber! !inipath! !aepname!
- for /l %%i in ( 1,1, !filenumber! ) do (
- echo filenumber=!filenumber! inipath=!inipath!
- if not exist "v:!inipath!\work_%%i.avi" ( echo 任务没有完成! )
- )
- )
复制代码 命令行返回如下:
v:\1aep>(
echo filenumber=!filenumber! inipath=!inipath!
if not exist v:!inipath!\work_4.avi (echo 任务没有完成! )
)
filenumber=5 inipath=\1avi\20141007183419060016s
任务没有完成
v:\1aep>(
echo filenumber=!filenumber! inipath=!inipath!
if not exist v:!inipath!\work_5.avi (echo 任务没有完成! )
)
filenumber=5 inipath=\1avi\20141007183419060016s
任务没有完成
我想问的是在if not exist v:!inipath!\work_5.avi (echo 任务没有完成! )这行中 !inipath!为什么没有数据。inipath应该是\1avi\20141007183419060016s才对啊 |