本帖最后由 batman 于 2011-4-27 21:45 编辑
需要用到split.exe
下载地址:http://bbs.bathome.net/viewthrea ... ighlight=%2Bbatcher- @echo off&setlocal enabledelayedexpansion
- md temp
- split -b 8000 a.txt temp\
- for /r temp %%a in (*) do (
- for /f "delims=" %%b in (%%a) do (
- set "str=!str!%%b"
- for /l %%b in (0,100,3900) do (
- set /a m+=1
- if !m! leq 10 (
- set "a=!a!!str:~%%b,100!指定字符"
- set "str=!str:~100!"
- ) else (
- set /a n+=1,m=0
- echo !a!>fg_!n!.txt&set "a="
- )
- )
- )
- )
- if "!a!" neq "" set /a n+=1&echo !a!>fg_!n!.txt
- rd /s /q temp
复制代码
|