本帖最后由 weichenxiehou 于 2011-10-12 22:46 编辑
- @echo off&setlocal enabledelayedexpansion
- for /f "skip=1 delims=:" %%i in ('findstr /n "+++++" test.txt') do set num=%%i&goto :next
- :next
- (for /l %%i in (1 1 %num%) do (
- set/p str=
- echo,!str!
- ))<test.txt>new.txt
- start new.txt
复制代码
|