本帖最后由 zaqmlp 于 2019-12-3 19:11 编辑
http://bcn.bathome.net/tool/PDFtk.rar下载解压,将exe、dll文件跟bat及pdf文件放一起- @echo off
- mode con lines=3000
- set info=互助互利,支付宝扫码头像,感谢打赏
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- set "newfolder1=#result"
- set "newfolder2=#tmp"
- cd /d "%~dp0"
- md "%newfolder1%" 2>nul
- if exist "%newfolder2%\" rd /s /q "%newfolder2%\"
- if not exist "pdftk.exe" (echo;"pdftk.exe" not found&goto end)
- for /f "delims=" %%a in ('dir /a-d/b "*印:*.pdf"') do (
- echo;"%%a"
- set n=1000001
- for /f "tokens=2 delims=:" %%b in ("%%~na") do (
- set "file=%%a"
- set /a m=n+%%b-1
- md "%newfolder2%" 2>nul
- setlocal enabledelayedexpansion
- for /l %%c in (!n! 1 !m!) do (
- copy "!file!" "%newfolder2%\%%c%%~xa"
- )
- endlocal
- pdftk.exe "%newfolder2%\*.pdf" cat output "%newfolder1%\%%~nxa"
- rd /s /q "%newfolder2%\"
- )
- )
- :end
- echo;%info%
- pause
复制代码
|