@echo off echo.& echo 请输入要搜索的资源名包含的字符: echo ---------------------------------- set /p n=文件名: echo.& echo.& echo 请输入搜索区域的路径(任一盤搜索可直接键入盤符号,全盤搜索时请键入CD): echo ------------------------------------------------------------------------ set /p m=标准路径: for /f "usebackq delims=" %%j in (`dir /a-d /b /s "%m%"\*"%n%"*`) do ( if exist %%j ( echo %%j&echo %%j>>"%userprofile%\found out.log"&echo.>>"%userprofile%\found out.log" )) ping /n 2 127.1>nul if exist "%userprofile%\found out.log" (echo.& echo 搜索结果已生成!) else (echo.& echo 没有搜索到资源!) echo.& echo 现在时间%time% ping /n 3 127.1>nul if exist "%userprofile%\found out.log" start "" "%userprofile%\found out.log" ping /n 2 127.1>nul if exist "%userprofile%\found out.log" del "%userprofile%\found out.log" ping /n 2 127.1>nul