回复 1# 开心畅享
用纯批这样应当可以,代码未测试,请自测:- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /b /a-d *.txt') do (
- set n=0
- (for /f "skip=10 delims=" %%i in ('type "%%a"') do (
- set /a n+=1
- echo,%%i
- if !n!==10 (
- (for /l %%j in (1,1,10) do (
- set /p str=
- echo,!str!
- ))<"%%a"
- )
- ))>"new_%%a"
- )
- pause
复制代码
|