@echo offset /p folder=请输入文件夹关键字for /f "delims=" %%a in ('dir /ad /b /s D:\Report') do (echo %%a|find "%folder%" >nul &&(start "" "%%~a"&exit))