@echo off setlocal enabledelayedexpansion cd /d "%~dp0" set "str=" for /f "delims=" %%i in ('dir /b /a-d /od *.pdf') do ( set str=!str! "%%i" ) pdftk !str! cat output BatHome.pdf复制代码