China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-05 14:51
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Enhanced System Junk Cleaner View 1,726 Replies 7
Original Poster Posted 2007-07-14 10:27 ·  中国 甘肃 张掖 电信
初级用户
Credits 125
Posts 49
Joined 2006-12-24 08:33
19-year member
UID 74424
Gender Male
Status Offline
I am idle and based on others' work, I made an enhanced version of system garbage cleaning. Please help with supplementation, criticism, and correction. Thanks~~
Strongly support, I also enhanced it based on others' work, please give pointers.
@echo off
SET TT=One-click system garbage cleaning
mode con: cols=70 lines=20
color 1f
TITLE %TT%------Made by Jianfeng ︻$▅▆▇◤
echo.
echo Please press any key to start cleaning general system garbage files!
pause>nul
echo.
echo Cleaning system garbage files, please wait......
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.
echo General system garbage cleaning completed!
echo.
echo.
:xuanze
echo.
SET Choice=
SET /P Choice=    Press q to exit the program, press c to continue enhanced cleaning:
IF NOT '%Choice%'=='' SET Choice1=%Choice:~0,1%
IF /I '%Choice%'=='q' goto end
IF /I '%Choice%'=='c' goto next
cls
goto xuanze
:next
cls
echo.
echo.
echo Tip: Enhanced cleaning is for cleaning residual garbage after system installation
echo It is recommended to use enhanced cleaning before backing up the system!
echo Please install patches before cleaning!
echo.
echo Please press any key to start enhanced cleaning, you can directly close this window to exit!
pause>nul
echo.
rd /s /q "c:\program files\messenger"
del /f /s /q "c:\program files\msn gaming zone\*.*"
rd /s /q "c:\program files\msn gaming zone"
del /f /s /q "c:\Program Files\InstallShield Installation Information\*.*"
for /f "delims=" %%a in ('dir /ad %windir%\$NtUninstallKB* /b') do rd /s /q %windir%\%%a
del /f /s /q %windir%\$hf_mig$\*.*
del /f /s /q "%windir%\RegisteredPakages\*.*"
del /f /s /q "%windir%\Downloaded Installations\*.*"
del /f /s /q "%windir%\web\wallpaper\肖像*.*"
:end
echo.
echo.
ECHO        ╭══════════════╮
ECHO    ╭═══┤   ★Made by Jianfeng★ ├═══╮
ECHO    ║   ╰══════════════╯   ║
ECHO    ║┏━┳━┳━┳━┓             ║
ECHO    ║┣┳┻┳┻┳┻┳┫ QQ:61813046 ║
ECHO    ║┣┻┳╋━╋┳┻┫             ║
ECHO    ║┣┳┻┫卐┣┻┳┫ Email:qpmgljf@163.com ║
ECHO    ║┣┻┳┻┳┻┳┻┫            ║
ECHO    ║┣┳┻┳┻┳┻┳┫ ║
ECHO    ║┗┻━┻━┻━┻┛             ║
ECHO    ║                      ║
ECHO    ║ ▉▉▉▉▉▉▉▉100%%▉▉▉▉▉▉▉▉▉   ║
ECHO    ╰══════════════════════╯
echo.
echo Cleaning completed!
echo.
echo Please press any key to end this program, thank you for using!
pause>nul
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
wudixin96 +3 2007-07-14 11:54
Floor 2 Posted 2007-07-30 14:46 ·  中国 江苏 扬州 电信
初级用户
Credits 35
Posts 22
Joined 2007-06-29 22:34
19-year member
UID 92723
Gender Male
Status Offline
Give it a support!!!
Floor 3 Posted 2007-07-30 15:53 ·  中国 陕西 西安 电信
初级用户
铂金会员
Credits 44
Posts 21
Joined 2007-04-15 04:26
19-year member
UID 85218
Gender Male
Status Offline
Learn something useful from this code!
Floor 4 Posted 2007-08-09 15:45 ·  中国 北京 华为云
新手上路
Credits 13
Posts 7
Joined 2007-08-07 14:47
18-year member
UID 94784
Gender Male
Status Offline
Learned some useful things
Floor 5 Posted 2007-08-12 15:52 ·  中国 湖南 株洲 电信
新手上路
Credits 4
Posts 2
Joined 2007-08-11 15:19
18-year member
UID 94965
Gender Male
Status Offline
Learn from others' strong points, the idea is good, learning~
Floor 6 Posted 2007-08-21 14:03 ·  中国 山东 烟台 莱阳市 联通
初级用户
Credits 43
Posts 22
Joined 2007-08-21 12:44
18-year member
UID 95494
Gender Male
Status Offline
Let's study, thank you the building owner for sharing!
Floor 7 Posted 2007-08-21 14:19 ·  中国 安徽 马鞍山 电信
初级用户
Credits 34
Posts 19
Joined 2007-08-05 07:24
19-year member
UID 94664
Gender Male
Status Offline
Floor 8 Posted 2007-08-21 22:47 ·  中国 山西 临汾 联通
中级用户
★★
Credits 216
Posts 81
Joined 2007-08-06 12:23
18-year member
UID 94721
Gender Male
Status Offline
The above code cannot clear the Recycle Bin. To clear the contents in the Recycle Bin, use the following code:

@echo off
set alldrive=c d e f g h i j k l m n o p q r s t u v w x y z
for %%a in (%alldrive%) do if exist %%a:\Recycled rd /s /q %%a:\Recycled
for %%a in (%alldirve%) do if exist %%a:\RECYCLER rd /s /q %%a:\RECYCLER
echo Cleanup completed!!
pause>nul

[ Last edited by icyheart on 2007-8-21 at 11:02 PM ]
Forum Jump: