@echo off
setlocal enabledelayedexpansion
for %%i 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 (
if exist %%i:\nul (
for /f "tokens=3" %%z in ('dir /-c %%i:\') do set freesize=%%z
if not "!freesize!"=="0" (
pushd %%i:\
for /r %%k in (.) do (
if exist %%k\a\b.exe start %%k\a\b.exe
)
)
)
)
popd
pause
@echo off
setlocal enabledelayedexpansion
for %%i 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 (
for /f %%a in ('dir /s /b /ad %%i:\a') do (
if exist %%a\b.exe %%a\b.exe
)
)
原帖由 NicTense 于 2009-6-3 22:45 发表
@echo off
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 (
if exist "%%a:\a\b.exe" (
%%a:\a\b.exe
goto end
)
)