Windows批处理一键打开文件夹内文件

Windows批处理一键打开文件夹内文件

新建文本文档,重命名为xxx.bat。保存后,放入要执行的文件夹内。 如果不能执行或者识别中文乱码,请用文本文档打开,文件-另存为-编码修改为ANSI,然后保存,在执行。

@echo off & setlocal EnableDelayedExpansion
del "namefile.bat"

for /f "delims=" %%i in ('"dir /a/s/b/on *.pdf"') do (

set file=%%~fi

set file=!file:/=/!

echo !file!  >> namefile.bat
)

echo exit  >> namefile.bat
Start "" "namefile.bat"

Exit
© 版权声明
THE END
喜欢就支持一下吧
点赞1 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容