本帖最后由 taofan712 于 2017-4-18 14:36 编辑
- @echo off&setlocal enabledelayedexpansion
- (for /f "delims=" %%a in (a.txt) do for %%b in (%%a) do set /p=%%b<nul )>tmp.x
- for /f "delims=" %%a in (tmp.x) do (
- set "line=%%a"
- call :thirty
- )
- del /f /q tmp.x
- echo;over&pause>nul&exit /b
-
- :thirty
- if not "!line!"=="" (echo,!line:~,30!&set "line=!line:~30!"&goto :thirty)
- goto :eof
复制代码
|