- 帖子
- 5
- 积分
- 19
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2018-4-24
|
我只会输出所有,不会提取,有没有大神指点一下,这是我弄的
@echo off
set listfile=D:\testpdf\1.txt
if exist %tmp%\tmp.txt del %tmp%\tmp.txt
if exist "%listfile%" del "%listfile%"
echo 正在查找PDF文件...
dir /s /b "D:\testpdf"|find /i ".pdf">>%tmp%\tmp.txt
echo.
echo 正在输出结果...
for /f "delims=" %%i in (%tmp%\tmp.txt) do (
echo %%~ni>>"%listfile%"
title=%%~fi
)
del %tmp%\tmp.txt
copy /y "%listfile%" "D:\testpdf"
exit /b |
|