本帖最后由 hanyeguxing 于 2011-4-22 21:20 编辑
- @echo off
- (for /f "usebackq delims=" %%a in ("%UserProfile%\桌面\a.txt") do (
- set "a=%%a"
- setlocal enableDelayedExpansion
- echo;!a:XX=SS!
- endlocal
- ))>$
- move $ "%UserProfile%\桌面\a.txt"
复制代码 1,要求桌面位于%UserProfile%\桌面
2,不保留空行
3,行首不是分号
4,还可以 使用 fr 或 sed |