n2hp1410

New Member
Mọi người cho mình hỏi 1 chút nhé,mình thấy trong miniwin của đĩa hirentboot có phần clear temp,bạn nào biết cách viết lệnh xoá file rác rồi lưu lại thành file exe như cái clear temp thì chỉ cho mình với,mình cảm ơn
 

lovemesweet_264

New Member
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
 
Code: C:\windows\system32\cleanmgr.exe /dc /sagerun: 1
C:\
D:\
e:\
cd\
cd c:\windows\prefetch
del *.* /q lưu lại *.bat nhé
 

musicworld1989

New Member
vudunghieumk Code: C:\windows\system32\cleanmgr.exe /dc /sagerun: 1
C:\
D:\
e:\
cd\
cd c:\windows\prefetch
del *.* /q lưu lại *.bat nhé mình vừa làm theo cách của bạn,nhưng chỉ xóa được 1 thư mục c:/prefetch thôi,còn các thư mục temp hay %temp% recent đều còn nguyên

có cách nào nữa không bạn
 

Các chủ đề có liên quan khác

Top