thử dòng lệnh này nhe bạn
Code: @echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: clean the temp folders of all local profiles ::
:: assumming the default location of these folders ! on the local computer !!! ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::Set Search directory to "Documents and Settings" folder
(Set Target=%AllUsersProfile:~0,-10%)
title,Finding the Temp subfolders in %Target%&COLOR 9E
If EXIST "%Target%",(
For /f "Tokens=*" %%* in ('dir "%Target%" /B') Do (
cd/D "%target%\%%*\Local Settings\Temp" && (
ATTRIB -S -H -R -A /D /S >nul & (
For /f "Tokens=*" %%* in ('dir /B') Do (
RD "%%*" /S /Q ||Del /F "%%*" )))>nul)
)
rem pause link nguồn: Code: http://www.petri.co.il/forums/showthread.php?t=20755 copy đoạn code trên và chép vào notepad. save file . bat nhe