谢谢指教!但我试了下面这个批处理也是只能删FAT32分区上的,NTFS分区的删不了。
@echo off
setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
set /a n=0
set dl=CDEFGHIJKLMNOPQRSTUVWXYZ
:s
set d=!dl:~%n%,1!:
echo y|cacls %d%\autorun.inf /t /c /e /g everyone:f>nul 2>nul
del /f /q /a s h r a %d%\autorun.inf>nul 2>nul
for /f "delims=" %%a in ('dir /s /b /a s h r a %d%\autorun.inf') do (rd \s \q %%a.\&rd /s /q %d%\autorun.inf)>nul 2>nul
set /a n=n+1
if not %n%==24 goto s