close

Windows在安裝和使用過程中都會產生相當多的垃圾文件,如:*.tmp

打開記事本把下面的文字複製,把文件名定為「清除系統垃圾.bat」

-----------------------------------------------------------------------------------------

@echo off
echo 正在清除系統垃圾文件,請稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系統垃圾完成!
echo. & pause 【指令解釋】

這只是一個把刪除的指令作成批次的檔型式

del /f /s /q %systemdrive%*.tmp
刪除磁碟中副檔名為TMP的暫存檔案

del /f /s /q %systemdrive%*._mp
刪除磁碟中副檔名為_MP的暫存檔案

del /f /s /q %systemdrive%*.log
刪除磁碟中副檔名為LOG的紀錄檔案

del /f /s /q %systemdrive%*.gid
刪除磁碟中副檔名為GID的暫存檔案

del /f /s /q %systemdrive%*.chk
刪除磁碟中副檔名為CHK的暫存檔案

這個都是磁碟掃描之後的檔案基本上沒什麼作用

del /f /s /q %systemdrive%*.old
刪除磁碟中副檔名為OLD的備份檔案

del /f /s /q %systemdrive%recycled*.*
刪除磁碟中資源回收筒的所有檔案

del /f /s /q %windir%*.bak
刪除磁碟中副檔名為BAK的備份檔案

del /f /s /q %windir%prefetch*.*
rd /s /q %windir%temp & md %windir%tempdel /f /q %userprofile%cookies*.*
del /f /q %userprofile%recent*.*
刪除userprofile回收筒的所有檔案

del /f /s /q "%userprofile%Local SettingsTemporary Internet Files*.*"
刪除所有瀏覽器的暫存檔案

del /f /s /q "%userprofile%Local SettingsTemp*.*"
del /f /s /q "%userprofile%recent*.*"
刪除暫存資料夾裡的所有檔案

 

 

 

創作者介紹
創作者 awdmo玩樂生活 的頭像
awdmo玩樂生活

玩樂生活部落格

awdmo玩樂生活 發表在 痞客邦 留言(0) 人氣()