本帖最后由 zaixinxiangnian 于 2011-10-3 22:12 编辑
我来个复杂的(也当做练习)
代码1- @echo off
- setlocal enabledelayedexpansion
- for /f %%i in (a.txt) do (
- set str=%%i
- if not "!str:~,1!" equ "/" echo !str!>>$
- )
- move $ a.txt
- pause
复制代码 代码2- @echo off
- findstr /v "\/" a.txt >$
- echo y|move $ a.txt
- pause
复制代码 代码3- @echo off
- for /f "eol=/" %%i in (a.txt) do echo %%i>>$
- move $ a.txt
- pause
复制代码
|