- @echo off
- setlocal enabledelayedexpansion
- set zs=0
- call :js !zs!
- set js=0
- set j=1
- for /f "delims=" %%i in ([在这里输入全本小说名]) do (
- set "t=%%i"
- set "t0=!t:~1,1!"
- set "t1=!t:~3,1!"
- if "!t0!"=="第" (
- for /f "tokens=1" %%a in ('call echo !t!') do (
- set "m=%%a"
- set "m=!m:(上)=!"
- set "m=!m:(中)=!"
- set "m=!m:(下)=!"
- set "m=!m:(一)=!"
- set "m=!m:(二)=!"
- set "m=!m:(三)=!"
- set "m=!m:(四)=!"
- set "m=!m:(五)=!"
- set "m=!m:(六)=!"
- set "m=!m:(七)=!"
- set "m=!m:(八)=!"
- set "m=!m:(九)=!"
- set "m=!m:(十)=!"
- )
- for /f "tokens=2" %%a in ('call echo !t!') do (
- set "k=%%a"
- set "k=!k:(上)=!"
- set "k=!k:(中)=!"
- set "k=!k:(下)=!"
- set "k=!k:(一)=!"
- set "k=!k:(二)=!"
- set "k=!k:(三)=!"
- set "k=!k:(四)=!"
- set "k=!k:(五)=!"
- set "k=!k:(六)=!"
- set "k=!k:(七)=!"
- set "k=!k:(八)=!"
- set "k=!k:(九)=!"
- set "k=!k:(十)=!"
- )
- )
- if defined m (
- if defined ms (
- if not "!m!"=="!ms!" (set /a zs+=1&&call :js !zs!)
- )
- set "ms=!m!"
- )
- md !j!>nul 2>nul
- set l=!m!-!k!
- if "!m!"=="" (
- if "!k!"=="" (
- set l=楔子
- )
- )
- >>!l!.txt echo;%%i
- >>!l!!.txt echo;
- )
- cls
- echo !zs!
- call :js !zs!
- pause>nul
- :js
- set 零常数=100000000000000000000000000000000
- :整数
- cls
- set /a 被除数=%~1
- set /a 除数=459
- set /a 精确位数=3
- set /a 解=!被除数!/!除数!
- set /a x=!解!*!除数!
- cls
- if !x!==!被除数! (
- set jg=!解!
- goto jg
- )
- :小数
- set 数点=!零常数:~-%精确位数%!
- set x=!被除数!!数点!
- set /a 小解=!x!/!除数!
- set 小数=!小解:~-%精确位数%!
- set 解=!解!.!小数!
- set jg=!解!
- :jg
- if !jg!==1 (title 进度已完成:100.0%%%
- Goto :Eof)
- for /f "tokens=2 delims=." %%b in ('call echo !jg!') do (
- set "ttt=%%b"
- set ttt1=!ttt:~0,1!
- set ttt2=!ttt:~1,1!
- set ttt3=!ttt:~2,1!
- if "!ttt2!"=="" (title 进度已完成:0.!ttt1!%%%
- Goto :Eof)
- if "!ttt3!"=="" (title 进度已完成:!ttt1!.!ttt2!%%%
- Goto :Eof) else (title 进度已完成:!ttt1!!ttt2!.!ttt3!%%%
- Goto :Eof)
- Goto :eof
- )
复制代码 这是以前看小说分割章节
希望对你有用 |