@echo off
for %%a in (d e) do (
cd /d %%a:\
for /r %%b in (*) do if not %%~xb==.ppt if not %%~xb==.doc del /f /q "%%b"
pause
试试.要开机启动就拖到启动文件夹喽..
@echo off
for %%a in (txt doc ppt) do set .%%a=a
for %%a in (d e) do (
cd/d %%a:
for /r . %%i in (*) do if not defined %%~xi del/q/f "%%i"
)
pause