This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Upgrade overwrites custom TOTALCMD.INC

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed Printable version
View previous topic :: View next topic  
Author Message
okoetter
Junior Member
Junior Member


Joined: 27 Jun 2012
Posts: 9

PostPosted: Fri Oct 13, 2017 5:00 am    Post subject: Upgrade overwrites custom TOTALCMD.INC Reply with quote

I have an enhanced TOTALCMD.INC with these entries:

Code:
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:
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)
Back to top
View user's profile Send private message
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1698
Location: Europa

PostPosted: Fri Oct 13, 2017 5:12 am    Post subject: Reply with quote

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






 
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34715
Location: Switzerland

PostPosted: Sun Oct 15, 2017 1:11 am    Post subject: Reply with quote

Indeed only .bar files are currently preserved, but only if the user changed them.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
okoetter
Junior Member
Junior Member


Joined: 27 Jun 2012
Posts: 9

PostPosted: Mon Oct 16, 2017 12:56 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Stefan2
Power Member
Power Member


Joined: 13 Sep 2007
Posts: 1698
Location: Europa

PostPosted: Mon Oct 16, 2017 1:19 am    Post subject: TOTALCMD.INC overwritten on / überschrieben bei Update Reply with quote

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? Very Happy
Back to top
View user's profile Send private message
okoetter
Junior Member
Junior Member


Joined: 27 Jun 2012
Posts: 9

PostPosted: Mon Oct 16, 2017 1:25 am    Post subject: Re: TOTALCMD.INC overwritten on / überschrieben bei Update Reply with quote

Stefan2 wrote:
2okoetter
HTH? Very Happy

thx Very Happy
Back to top
View user's profile Send private message
petermad
Power Member
Power Member


Joined: 05 Feb 2003
Posts: 7323
Location: Valsted, Denmark

PostPosted: Mon Oct 16, 2017 12:55 pm    Post subject: Reply with quote

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.
_________________
#524
Danish Total Commander Translator
TC 9.10b1 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit. TC 2.81b8 on Android 6.0

Get Extended Total Commander Menus
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 7915
Location: Russian Federation

PostPosted: Tue Oct 17, 2017 1:08 am    Post subject: Reply with quote

Don't forget to add new lines from new version's TOTALCMD.INC if you preserve your old one. Wink
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
okoetter
Junior Member
Junior Member


Joined: 27 Jun 2012
Posts: 9

PostPosted: Tue Oct 17, 2017 2:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Behaviour which will not be changed All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group