本帖最后由 CrLf 于 2011-12-28 20:20 编辑
- @echo off & setlocal EnableDelayedExpansion
- cd.>3.txt
- for /f "delims=" %%i in (2.txt) do (
- set ret=
- for %%a in (%%i) do if defined %%a (set ret=!ret!!%%a!) else set ret=!ret! %%a
- if not "!ret!"=="" (set ret=!ret:abc=! && echo !ret!) else echo.)>>3.txt
- @exit
复制代码 上面这段代码可以把把abc替换成空,我想把" | "替换成","却没有效果,想问一下有没有办法可以替换
谢谢 |