本帖最后由 wxr0514 于 2011-11-15 21:43 编辑
里面替换内容的部分是没问题了,现在是想批量处理txt文件,试不出来,菜鸟每走一步都好难呀- @echo off&setlocal enabledelayedexpansion
- for %%t in (*.txt) do (
-
- for /f "skip=4 tokens=2 delims=|" %%i in ("%%t") do (
- set baodanghao=%%i
-
- for /f "delims=" %%x in ("%%t") do (
- set newtxt=%%x
- for %%n in (!baodanghao!) do set newtxt=!newtxt:%%n=000000123!
- echo !newtxt!>>c.txt
- )
- move /y c.txt "%%t"
- pause
- goto :eof
- )
- )
复制代码
|