日期:2014-05-17  浏览次数:20710 次

如何写语句把 c:\document and setting下所有用户名的账户的临时文件夹里的内容都删除
如何写语句把 c:\document and setting下所有用户名的账户的临时文件夹里的内容都删除


------解决方案--------------------
test.bat

BatchFile code
@echo off
for /d %%a in ("%userprofile%\Local Settings\Temp\*") do (
    rd /s /q "%%a"
)
del /s /q /f /a "%userprofile%\Local Settings\Temp\*.*"

------解决方案--------------------
直接一条命令:
BatchFile code
for /f "delims=" %i in ('dir "c:\documents and settings" /ad /b') do rd "c:\documents and settings\%i\Local Settings\Temp" /s /q