@echo off & title 全盘搜索指定目录并删除 By 依梦琴瑶
setlocal enabledelayedexpansion
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:\" (
pushd "%%~a:\"
for /f "delims=" %%b in ('dir /ad/s/b MEN*') do (
if "%%~nxb"=="MEN" (
set "Confirm="
set /p Confirm=是否删除 "%%~b" (Y / 其它任何字符为否)?
if /i "!Confirm!"=="Y" rd /s/q/f "%%~b"
)
)
popd
)
)
pause