- @echo off
- (for /f "delims=" %%a in ('fsutil fsinfo drives^|more') do (
- set "a=%%a"
- setlocal enabledelayedexpansion
- for %%b in (!a:驱动器: ^=!) do fsutil fsinfo drivetype %%~db
- endlocal
- ))>"%~dp0$"
- for /f %%a in ('find "固定" ^< "%~dp0$"') do (
- if exist %%a\123.exe set "ccc=%%a\"
- )
- del "%~dp0$"
- echo,%ccc%
- pause
复制代码
|