作者nienting (密逃)
看板EZsoft
標題Re: [請益] 刪除垃圾檔的小程式
時間Tue Sep 18 14:34:42 2007
※ 引述《Bear8079 (好問題)》之銘言:
: 以前有看過一小段程式碼
: 貼到記事本裡面
: 存檔後執行就會自動刪除不必要的檔案
: 前陣子重灌電腦忘記備份
: 不知道有沒有版友有呢?
你說的是這個嗎?(我不是原著,我也是在這個版看到的)
=============以下貼到記事本存成 .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
======================================================
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.175.143
推 Bear8079:嗯嗯 就是這個 謝謝<(_ _)> 09/18 14:56
→ gigfast:要到了嗎 ?我有 如果沒有 我再傳給你.. 09/18 15:43
推 pat10001430:不好意思順便問一下有人知道%systemdrive%是指那個預 09/18 18:34
→ pat10001430:設資料夾嗎? 09/18 18:34
推 donkeychen:你CMD 然後打ECHO %systemdrive%就知道了 09/18 20:11
推 pat10001430:感恩! 09/18 20:15