回复 1# 15972587869 - rem 全盘搜索:xx软件.exe。只要找到任意1个,就goto。找不到就另goto
- set "FileName=xx软件.exe"
- echo 正在搜索,请稍候...
-
- echo 本地磁盘:
- for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
- fsutil fsinfo drivetype %%a: | find "固定">nul && (echo %%a) && (
-
- if exist %%a:\ (
- for /f "delims=" %%b in ('dir /a-d /s /b "%%a:\*%FileName%" 2^>nul') do (
- if /i "%%~nxb" equ "%FileName%" (
- echo,%%b
- goto :nexta
- )
- )
- )
-
- )
- )
-
- ———————————————————————
- :firsta
- echo firstaaa
- exit
-
- ———————————————————————
- :nexta
- echo nextaaa
-
- exit
复制代码
|