中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-15 12:30
47,812 topics / 349,917 posts / today 0 new / 48,268 members
DOS批处理 & 脚本技术(批处理室) » Is there anyone who wants to make a batch script for garbage cleaning?
Printable Version  5,911 / 20
Floor1 electronixtar Posted 2006-10-23 08:11
铂金会员 Posts 2,672 Credits 7,493
CCleaner is well done, but it must be installed. Too disgusting. Can we make a batch script?

Extract the databases in CCleaner, winapp.ini, winreg.ini, winsys.ini, and then use batch to read the ini files, and then use general statements to perform these operations.

Since CCleaner has claimed copyright, it is not convenient to post it here. Friends who want to study can download a CCleaner

There is a new type of junk that may not be cleared by CCleaner: Windows patch backups

[ Last edited by electronixtar on 2006-10-23 at 08:17 ]
Floor2 namejm Posted 2006-10-23 08:25
荣誉版主 Posts 1,737 Credits 5,226 From 成都
There are already people on the Internet who have made batch scripts for system garbage cleaning, but they can only clear temporary files and backup files and other things in a few fixed locations like %tmp% in the system. There are no specific garbage files for specific software. It seems that batch scripts for clearing garbage can be further studied.

Attachments
快速清理垃圾文件安装版.rar (1.27 KiB)
Floor3 electronixtar Posted 2006-10-23 08:42
铂金会员 Posts 2,672 Credits 7,493
Heheh, those things are not systematic and not comprehensive. We can make one that can automatically update the database and is comprehensive, and make it modular. For example, cleaning the folder is a function, and then read an ini file to call this function. In this way, users can add the content they need by themselves. Just cleaning files is not enough; it should also include registry and third-party software cleaning. I mention the importance of CCleaner because CCleaner is comprehensive. It really covers everything.

The version of moderator namejm is too little, too basic.



And the temporary file directories collected in CCleaner are not at the same level as the above batch script. Here is a rough one, which can be used as a reference and also comes from CCleaner's data. Don't say I infringe on copyright, I'm just "academic discussion"

FileKey1=%userprofile%\Local Settings\Application Data\Adobe\Acrobat\7.0\Cache\Search70|*.*
FileKey2=%ProgramFiles%\Adobe\Acrobat 7.0\Reader|*.bak
FileKey3=%ProgramFiles%\Adobe\Acrobat 7.0\ActiveX|*.bak
FileKey4=%ProgramFiles%\Adobe\Acrobat 7.0\Reader\plug_ins|*.bak
FileKey5=%ProgramFiles%\Adobe\Acrobat 7.0\Reader\Updater|*.bak
FileKey1=%appdata%\Adobe\CameraRaw\Cache|*.*
FileKey1=%appdata%\Google\Local Search History|*.*
FileKey1=%appdata%\Real\RealOne Player|cookies.txt
FileKey2=%appdata%\Real\RealOne Player|ctd.dat
FileKey3=%appdata%\Real\RealOne Player|realplayer.ste
FileKey4=%appdata%\Real\RealOne Player\History|*.*
FileKey5=%appdata%\Real\RealPlayer|cookies.txt
FileKey6=%appdata%\Real\RealPlayer|ctd.dat
FileKey7=%appdata%\Real\RealPlayer|realplayer.ste
FileKey8=%appdata%\Real\RealPlayer\History|*.*
FileKey9=%ProgramFiles%\Common Files\Real\Update_OB|RealPlayer-log.txt
FileKey1=%userprofile%|QTPlayerSession.xml
FileKey2=%appdata%\Apple Computer\QuickTime|QTPlayerSession.xml
FileKey1=%userprofile%\Local Settings\Application Data\Apple Computer\QuickTime\downloads|*.*|RECURSE
FileKey1=%appdata%\Microsoft\Office\Recent|*.*
FileKey1=%appdata%\Microsoft\Office\Recent|*.*
FileKey1=%appdata%\Microsoft\Office\Recent|*.*
FileKey1=%appdata%\Macromedia\Flash Player|*.*|RECURSE
FileKey1=%allusersprofile%\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey2=%userprofile%\Local Settings\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey3=%allusersprofile%\Application Data\Symantec\LiveUpdate\Downloads|*.*
FileKey1=%allusersprofile%\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey2=%userprofile%\Local Settings\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey3=%allusersprofile%\Application Data\Symantec\LiveUpdate\Downloads|*.*
FileKey1=%userprofile%\Local Settings\Application Data\Microsoft\Terminal Server Client\Cache|*.*
FileKey1=%ProgramFiles%\Ahead\Nero|NeroHistory.log
FileKey1=%allusersprofile%\Application Data\Spybot - Search & Destroy\Logs|*.*
FileKey2=%ProgramFiles%\Spybot - Search & Destroy|advdebug.txt
FileKey3=%allusersprofile%\Application Data\Spybot - Search & Destroy|Statistics.ini
FileKey4=%windir%\All Users\Application Data\Spybot - Search & Destroy\Logs|*.*
FileKey5=%windir%\All Users\Application Data\Spybot - Search & Destroy|Statistics.ini
FileKey1=%ProgramFiles%\Lavasoft\Ad-Aware SE Personal|defs.ref.old
FileKey2=%userprofile%\Application Data\Lavasoft\Ad-Aware\Logs|*.txt
FileKey1=%ProgramFiles%\Lavasoft\Ad-Aware SE Professional|defs.ref.old
FileKey2=%userprofile%\Application Data\Lavasoft\Ad-Aware\Logs|*.txt
FileKey1=%ProgramFiles%\Lavasoft\Ad-Aware SE Plus|defs.ref.old
FileKey2=%userprofile%\Application Data\Lavasoft\Ad-Aware\Logs|*.txt
FileKey1=%ProgramFiles%\Webroot\Spy Sweeper\Temp|*.*
FileKey2=%userprofile%\Application Data\Webroot\Spy Sweeper\Logs|*Log.txt
FileKey1=%ProgramFiles%\Driver Cleaner Pro\Log|*.log
FileKey1=%ProgramFiles%\Netscape\Users\default|netscape.hst
FileKey2=%ProgramFiles%\Netscape\Users\default|cookies.txt
FileKey3=%ProgramFiles%\Netscape\Users\default\cache|*.*
FileKey1=%userprofile%\Application Data\Axialis\Temporary Preview Files|*.*|RECURSE
FileKey1=%ProgramFiles%\eMule\config|AC_SearchStrings.dat
FileKey1=%ProgramFiles%\eMule\config|known.met
FileKey2=%ProgramFiles%\eMule\config|known2.met
FileKey1=%userprofile%\Application Data\Sun\Java\Deployment\cache|*.*|RECURSE
FileKey2=%userprofile%\Application Data\Sun\Java\Deployment\javaws\cache|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\Microsoft\Movie Maker|MEDIATAB0.DAT
FileKey1=%ProgramFiles%\GetRight|GetRight.hst
FileKey1=%ProgramFiles%\DAP\Temp|*.*
FileKey2=%ProgramFiles%\DAP\Ads|*.*
FileKey3=%ProgramFiles%\DAP\Log|*.*
FileKey1=%userprofile%\Local Settings\Application Data\TiVo Desktop\Cache|*.*
FileKey1=%ProgramFiles%\CA\eTrust Internet Security Suite\eTrust EZ Antivirus|*.log
FileKey2=%ProgramFiles%\CA\eTrust Internet Security Suite\eTrust EZ Antivirus|*log.txt
FileKey3=%ProgramFiles%\CA\eTrust Internet Security Suite\eTrust EZ Antivirus\ArcTemp|*.tmp
FileKey4=%allusersprofile%\Application Data\CA\Consumer\AV|*.tmp|RECURSE
FileKey5=%allusersprofile%\Application Data\CA\Consumer\AV|*.txt|RECURSE
FileKey6=%allusersprofile%\Application Data\CA\Consumer\CCube|*.tmp|RECURSE
FileKey7=%allusersprofile%\Application Data\CA\Consumer\CCube|*.txt|RECURSE
FileKey8=%allusersprofile%\Application Data\CA\Consumer\ISS\FeedStore|*.txt|RECURSE
FileKey9=%ProgramFiles%\CA\CA Internet Security Suite\CA Anti-Virus\ArcTemp|*.*
FileKey10=%ProgramFiles%\CA\CA Internet Security Suite\CA Anti-Virus\tmp|*.*
FileKey1=%windir%\Internet Logs|ZALog*.*
FileKey1=%userprofile%\Application Data\Google\GoogleEarth|dbcache.dat
FileKey2=%userprofile%\Application Data\Google\GoogleEarth|dbcache.dat.index
FileKey1=%ProgramFiles%\Microsoft AntiSpyware|errors.log
FileKey2=%ProgramFiles%\Microsoft AntiSpyware|tracksEraser.log
FileKey3=%ProgramFiles%\Microsoft AntiSpyware|cleaner.log
FileKey1=%allusersprofile%\Application Data\Raxco\PerfectDisk\7.0|PerfectDisk.log
FileKey1=%userprofile%\Application Data\Azureus\logs|*.log
FileKey2=%userprofile%\Application Data\Azureus\logs\save|*.log
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\7.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\7.0\CacheThumbs|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\7.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\7.0\CacheThumbs|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\8.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\8.0\CacheThumbs|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\8.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\8.0\CacheThumbs|*.*|RECURSE
FileKey1=%allusersprofile%\.clamwin\log|*.*
FileKey2=%userprofile%\.clamwin\log|*.*
FileKey3=%windir%\All Users\.clamwin\log|*.*
FileKey1=%ProgramFiles%\Ewido\Security Suite|logfile.txt
FileKey2=%ProgramFiles%\Ewido Anti-Malware|logfile.txt
FileKey1=%ProgramFiles%\Grisoft\AVG Anti-Spyware 7.5|logfile.txt
FileKey1=%ProgramFiles%\OpenOffice.org1.1.4\user\registry\data\org\openoffice\Office|Common.xcu
FileKey1=%appdata%\OpenOffice.org2\user\registry\data\org\openoffice\Office|Common.xcu
FileKey1=%allusersprofile%\Application Data\Grisoft\Avg7Data|*.log
FileKey2=%allusersprofile%\Application Data\Grisoft\Avg7Data\upd7bin|*.*
FileKey3=%allusersprofile%\Application Data\Grisoft\Avg7Data\$history|*.*
FileKey4=%allusersprofile%\Application Data\Grisoft\Avg7Data\avg7upd|*.log
FileKey5=%windir%\All Users\Application Data\Grisoft\Avg7Data\upd7bin|*.*
FileKey6=%windir%\All Users\Application Data\Grisoft\Avg7Data\avg7upd|$history
FileKey7=%windir%\All Users\Application Data\Grisoft\Avg7Data\avg7upd|*.log
FileKey8=%windir%\All Users\Application Data\Grisoft\Avg7Data|*.log
FileKey9=%windir%\Application Data\AVG7\Log|*.log
FileKey1=%ProgramFiles%\AVPersonal\AVTEST|*.*
FileKey2=%ProgramFiles%\AVPersonal\FAILSAVE|*.*
FileKey3=%ProgramFiles%\AVPersonal\INFECTED|*.*
FileKey4=%ProgramFiles%\AVPersonal\LOGFILES|*.*
FileKey5=%ProgramFiles%\AVPersonal\SYSSAVE|*.*
FileKey6=%ProgramFiles%\AVPersonal\TEMP|*.*
FileKey7=%ProgramFiles%\AVPersonal\TESTPATH|*.*
FileKey8=%ProgramFiles%\AVPersonal\UPDATE|*.*
FileKey1=%allusersprofile%\Application Data\Microsoft\Windows Defender\Scans\History\Results\Quick|*.*
FileKey2=%allusersprofile%\Application Data\Microsoft\Windows Defender\Scans\History\Results\Resource|*.*
RegKey1=HKCU\Software\Microsoft\Internet Explorer\TypedURLs
RegKey2=HKCU\Software\Microsoft\Internet Explorer\Explorer Bars\{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}\FilesNamedMRU
RegKey3=HKCU\Software\Microsoft\Internet Explorer\Explorer Bars\{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}\ContainingTextMRU
RegKey1=HKCU\Software\Microsoft\Internet Explorer|Download Directory
RegKey2=HKCU\Software\Microsoft\Internet Explorer\Main|Save Directory
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
RegKey1=HKCU\Software\Microsoft\Search Assistant\ACMru
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FindComputerMRU
RegKey3=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\PrnPortsMRU
RegKey4=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU
RegKey5=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions
RegKey6=HKLM\Software\Microsoft\Direct3D\MostRecentApplication|Name
RegKey7=HKCU\Software\Microsoft\Direct3D\MostRecentApplication|Name
RegKey8=HKLM\Software\Microsoft\DirectDraw\MostRecentApplication|Name
RegKey9=HKCU\Software\Microsoft\DirectInput\MostRecentApplication|Id
RegKey10=HKCU\Software\Microsoft\DirectInput\MostRecentApplication|Name
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify|IconStreams
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify|PastIconsStream
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{5E6AB780-7743-11CF-A12B-00AA004AE837}\Count
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout
Detect=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify
Detect=HKLM\System\CurrentControlSet\Services\w3svc


More detailed ones are in the installation directory of CCleaner. Due to copyright issues, I can't post them directly. You can download one and have a look.

[ Last edited by electronixtar on 2006-10-23 at 08:51 ]
Floor4 electronixtar Posted 2006-10-23 10:38
铂金会员 Posts 2,672 Credits 7,493
Well, my idea is like this: a ccleaner.bat, and then winapp.ini, winreg.ini, winsys.ini. ccleaner reads these configuration files.

Structure of ccleaner.bat

:Main

:ReadINI

:DelFiles

:DelReg
Floor5 namejm Posted 2006-10-23 11:08
荣誉版主 Posts 1,737 Credits 5,226 From 成都
Reading the paths in the ini file and extracting the registry - formatted paths and non - registry - formatted paths is very easy to do, and deleting them is also a piece of cake. It's just that it's not very convenient to delete the files in the specified path; generally, all the found ones are deleted. This is also a big difference between the character interface and the graphical interface. Although batch processing can realize some functions, I personally feel that the graphical interface is more convenient.
Floor6 lxmxn Posted 2006-10-23 12:28
版主 Posts 4,938 Credits 11,386
 
  It is suggested that the landlord extract the garbage files to be deleted and the registry paths to be deleted in ccleaner, because the average person does not know so comprehensively. We can refer to the inside paths to make batch processing.
Floor7 namejm Posted 2006-10-24 01:06
荣誉版主 Posts 1,737 Credits 5,226 From 成都
Here is a demonstration code for extracting paths. You can take it and refine it:

Floor8 electronixtar Posted 2006-10-24 01:11
铂金会员 Posts 2,672 Credits 7,493

It is suggested that the landlord extract the junk files to be deleted in ccleaner and the registry paths to be deleted.


If ccleaner didn't have such a boring public statement of copyright, I would have already posted it.

I think making a league-standard ini format, how about it?
Floor9 vkill Posted 2006-10-24 01:25
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
I think it's up to personal preference to clean up junk.
Floor10 xypcmac Posted 2006-10-24 02:44
初级用户 Posts 80 Credits 167
This is a necessary task for every computer. Having this is necessary... Convenience is good!
Floor11 electronixtar Posted 2006-10-24 03:39
铂金会员 Posts 2,672 Credits 7,493
What I mean is to make a very comprehensive, the most powerful and convenient garbage cleaning tool in China. And the format is open, you can add paths by yourself and modify the bat module by yourself
Floor12 lxmxn Posted 2006-10-24 05:24
版主 Posts 4,938 Credits 11,386

  Yeah, support~~
Floor13 10it Posted 2006-10-29 16:36
新手上路 Posts 3 Credits 6
“What I mean is to make a very comprehensive, the most powerful and convenient garbage cleaning tool in China. And the format is open, you can add paths by yourself, and modify the bat module by yourself”

The landlord has a commendable spirit. I just started learning DOS and can't help much. But I'm very happy to meet so many friends who really like DOS here.
Floor14 chainliq Posted 2006-10-29 18:59
高级用户 Posts 244 Credits 635 From 广西贵港
Well, not bad, everyone keep up the good work. And, I think the speed of batch processing to clear garbage is not worse than that of third-party software oh!
Floor15 雨露 Posted 2006-10-29 20:57
管理员 Posts 2,601 Credits 6,215
I'm now afraid to delete junk. The last time I used Super Rabbit to clean the system, it ended up deleting my hard - earned 400MB collection of DOS software without a trace! Now I'm using manual methods!
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023