本帖最后由 CrLf 于 2012-6-11 12:25 编辑
本人菜鸟,刚学批处理,请教一下,下面的代码执行过程中提示findstr无法打开%i,是什么原因呢?- @echo off
- for /f "delims=" %%i in ('dir /a-d /b /s "%~dp0symbol.css"') do (
- findstr "PCDS" %%i || goto wlj2
- goto wlj1
- :wlj2
- findstr "CDS_LMAN_SYM_OUTLINE" %%i >$
- for /f "delims=, tokens=2,3" %%j in ($) do (
- setlocal enabledelayedexpansion
- set /a "b=%%j+20"
- set /a "c=%%j+50"
- echo P "PART_NUMBER" "?" -%%k !b! 0 0 32 0 0 0 0 0 1 0 0 >>$
- echo P "$LOCATION" "?" -%%k !c! 0 0 32 0 0 0 0 0 1 0 0 >>$
- endlocal
- )
- findstr /v "CDS_LMAN_SYM_OUTLINE" %%i >>$
- move $ %%i
- )
- :wlj1
- exit
复制代码
|