本帖最后由 batman 于 2011-4-28 20:49 编辑
- @echo off&setlocal enabledelayedexpansion
- rd /s /q temp fgfile 2>nul&md temp fgfile
- split -b 8000 a.txt temp\
- set /a b=0
- for /r temp %%a in (*) do (
- set /a "a=(%%~za+b)/200","b=(%%~za+b)%%200"
- for /f "delims=" %%b in (%%a) do (
- set "str=!str!%%b"
- for /l %%b in (1,1,!a!) do (
- set /a m+=1
- if !m! leq 9 set "c=!c!!str:~,100!指定字符"
- if !m! equ 10 set /a n+=1,m=0&echo !c!!str:~,100!指定字符>fgfile\fg_!n!.txt&set "c="
- set "str=!str:~100!"
- )
- )
- )
- if "!c!" neq "" set /a n+=1&echo !c!>fgfile\fg_!n!.txt
- rd /s /q temp&start fgfile
复制代码 --------------------------------------------------------------------------
郁闷,转成unicode根本实现不了读取,8000改成16000也会出错。。。 |