1. ren重命名
@echo offecho > a.txtset DIR=%cd%set DIR=%DIR%for /r . %%i in (.) do (echo %%i >> a.txt)find "P&ID" a.txt > b.txtfind "IFD" b.txt > c.txtfor /F "skip=2 delims=" %%a in (c.txt) do (pushd %%aset x=%%aset x=!x:~0,-1!echo %x%rem echo %%arem for /r . %%b in (*.pdf) do (rem echo %%brem )rem for /F %%b in ('dir *.pdf /b') do (rem set c=%%brem set d=%c:~0,-1%rem echo %d%rem echo %%bset i=\rem echo %%a%i%%%brem xcopy %%a%%b %DIR%%i%%%b /irem )rem popd)pause
