Upgrade overwrites custom TOTALCMD.INC

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
okoetter
Junior Member
Junior Member
Posts: 9
Joined: 2012-06-27, 07:08 UTC

Upgrade overwrites custom TOTALCMD.INC

Post by *okoetter »

I have an enhanced TOTALCMD.INC with these entries:

Code: Select all

cm_GotoDriveA=2061;Switch to drive A
cm_GotoDriveB=2062;Switch to drive B
cm_GotoDriveC=2063;Switch to drive C
cm_GotoDriveD=2064;Switch to drive D
cm_GotoDriveE=2065;Switch to drive E
cm_GotoDriveF=2066;Switch to drive F
cm_GotoDriveG=2067;Switch to drive G
cm_GotoDriveH=2068;Switch to drive H
cm_GotoDriveI=2069;Switch to drive I
cm_GotoDriveJ=2070;Switch to drive J
cm_GotoDriveK=2071;Switch to drive K
cm_GotoDriveL=2072;Switch to drive L
cm_GotoDriveM=2073;Switch to drive M
cm_GotoDriveN=2074;Switch to drive N
cm_GotoDriveO=2075;Switch to drive O
cm_GotoDriveP=2076;Switch to drive P
cm_GotoDriveQ=2077;Switch to drive Q
cm_GotoDriveR=2078;Switch to drive R
cm_GotoDriveS=2079;Switch to drive S
cm_GotoDriveT=2080;Switch to drive T
cm_GotoDriveU=2081;Switch to drive U
cm_GotoDriveV=2082;Switch to drive V
cm_GotoDriveW=2083;Switch to drive W
cm_GotoDriveX=2084;Switch to drive X
cm_GotoDriveY=2085;Switch to drive Y
cm_GotoDriveZ=2086;Switch to drive Z
After each of my last upgrades (9.0a -> 9.10b1, b2, b3, RC1) my custom TOTALCMD.INC got overwritten with the default one and I am left with these lines:

Code: Select all

cm_GotoDriveA=2061;Switch to drive A
cm_GotoDriveC=2063;Switch to drive C
cm_GotoDriveD=2064;Switch to drive D
cm_GotoDriveE=2065;Switch to drive E
cm_GotoDriveF=2066;(etc, define your own if)
cm_GotoDriveZ=2086;(you need more drives)
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Yes, that is how it works. This is no bug but indented.
More info can be found in older posts.






 
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed only .bar files are currently preserved, but only if the user changed them.
Author of Total Commander
https://www.ghisler.com
okoetter
Junior Member
Junior Member
Posts: 9
Joined: 2012-06-27, 07:08 UTC

Post by *okoetter »

Stefan2 wrote:More info can be found in older posts.
OK, can you please elaborate about that? I searched but possibly with the wrong search terms because I was unable to find anything that helps me here.

Question:
Is there a possibility to make changes not to the TOTALCMD.INC file itself but to another file and reference to that? Or is my best bet to simply backup my TOTALCMD.INC and restore it after every TC upgrade?

Thanks for pointing me to the proper direction :-)
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

TOTALCMD.INC overwritten on / überschrieben bei Update

Post by *Stefan2 »

2okoetter

ghisler(Author) already pointed out his statement here too.

Another idea from the community was to flag the TOTALCMD.INC read-only.


I on my own have a second inc, named like "TOTALCMD.INC_own.txt" or just "TOTALCMD - Kopie.INC",
from where I can quickly copy and paste the related lines into a new inc.
It is not that often that I have to do this, so no need for me for a scripted solution.

Your "restore and backup" is no good idea, as with that way you will miss new entries from newer TC version in your restored file.



HTH? :D
okoetter
Junior Member
Junior Member
Posts: 9
Joined: 2012-06-27, 07:08 UTC

Re: TOTALCMD.INC overwritten on / überschrieben bei Update

Post by *okoetter »

Stefan2 wrote:2okoetter
HTH? :D
thx :D
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2okoetter

If you set the read-only attribute for totalcmd.inc (or other TC files you want to preserve), then TC's Installer will ask if you want to overwrite it or not during an upgrade - simple.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Don't forget to add new lines from new version's TOTALCMD.INC if you preserve your old one. :wink:
okoetter
Junior Member
Junior Member
Posts: 9
Joined: 2012-06-27, 07:08 UTC

Post by *okoetter »

Thanks all for your ideas.

I think I won't set the read only attribute because this way I won't get new lines. I simply made a copy of TOTALCMD.INC in the same folder and I will compare this copy with the original with WinMerge after each upgrade. So I am able to merge the two files within seconds.
Post Reply