Merge.bat to append Custom.ini to WinApp2.ini

Further to posts at #2528 through to #2546 in http://forum.pirifor...c=32310&st=2520

This is a discussion area and another solution for appending your own Custom.ini to WinApp.ini

New code

@ECHO OFF
(ECHO ;;+; Custom.Ini below Added %DATE% %TIME% :- & ECHO( & MORE Custom.ini ) >> Winapp2.ini
FIND ";;+;" < Winapp2.ini
PAUSE

New features are :-

The data and time of appending are recorded ;

A blank line precedes Custom.ini to ensure valid separation before the custom entry code blocks ;

New or modified Custom.ini may be additionally appended.

After the Append action, all Date + Time stamps in the latest WinApp2.ini are shown as a reminder if you have already merged and when.

I believe that any repetition of an entry MAY result in a duplication of CCLeaner checkboxes but is unlikely to do harm.

You are warned by the appearance of 2 or more time stamps if there is potential duplication by repeated Merges.

N.B. without far more code there can be no warning if a Custom.ini entry duplicates a downloaded WinApp2.ini entry.

I do not have time now to exhaustively test the consequences. of repetitions,

but will be interested in seeing your experiences.

I wonder if this won't fill the ccleaner.ini file with extra entries too. ?

Any entry you create with winapp2.ini will create an extra entry in ccleaner.ini, but a cluttered ccleaner.ini doesn't seem to impact CCleaner's performance.

Edit: idea: merge.bat creates a winapp2.ini backup (winapp2.bak) and if it detects that, it deletes the current winapp2.ini, merges custom.ini+winapp2.bak >> winapp2.ini

Any entry you create with winapp2.ini will create an extra entry in ccleaner.ini,

Fixed version: Any entry you change the checkmark on in CCleaner will create an extra entry in ccleaner.ini,

;)

My code above fully meets the first requirement which was to merge a static and never changing Custom.ini.

A subsequent need was to allow for additions to Custom.ini.

and for these to also be merged.

Hence the above code permits such additions but reminds you that it has been performed more than once.

I believe having duplications will have no effect on those with a static Custom.ini.

and have no significant degradation on performance for those who add to Custom.ini,

Degradation will be eliminated upon :-

the next Winapp2.ini download ;

or a slight edit on the merged WinApp2.ini ;

OR (hopefully - but not tested) by running Trim.bat.

I have already noted the Trim.Bat problem reported with an entry that includes a path containing "*]"

and may attend to that next.