[Implemented in Tc11.03rc3} [Tc11] Suggestion: COMMANDER_INI_PATH

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Fla$her
Power Member
Power Member
Posts: 2586
Joined: 2020-01-18, 04:03 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *Fla$her »

2petermad
I perceive the combination file_name_path as a full name, And in the code I demonstrated why. _PARENT explicitly points to the directory. _PARENT_PATH would be a bit long, IMHO.
But since the variables don't initially offer EXE/INI file names without paths, _PATH will probably be more appropriate here.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 15479
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of: %COMMANDER_INI%\..

Post by *petermad »

2Fla$her

%COMMANDER_SETTINGS% could alo be an option for the name - if implemented.
License #524 (1994)
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
JOUBE
Power Member
Power Member
Posts: 1561
Joined: 2004-07-08, 08:58 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *JOUBE »

I based my suggestion on commander_path. commander_ini_path looks pretty strange but it's self-explanatory. I think commander_settings, on the other hand, leads to numerous questions in the forum and is less good.
Fla$her
Power Member
Power Member
Posts: 2586
Joined: 2020-01-18, 04:03 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *Fla$her »

petermad wrote: 2023-11-10, 17:19 UTC %COMMANDER_SETTINGS% could alo be an option for the name - if implemented.
_SETTINGS is a bad identifier, it doesn't point to a path or a name. How about _INI_DIR?
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 15479
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *petermad »

_INI_DIR is also OK, but since we have %COMMANDER_PATH% already it seems more consistant with %COMMANDER_INI_PATH%
License #524 (1994)
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 5174
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *white »

If you are not using ini files with different filename lengths, you can use a substring, for example:

Code: Select all

%COMMANDER_INI:~0,-11%
User avatar
Usher
Power Member
Power Member
Posts: 1709
Joined: 2011-03-11, 10:11 UTC

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Usher »

Have you tried to use substring in Win9x?
Andrzej P. Wozniak
Polish subforum moderator
User avatar
white
Power Member
Power Member
Posts: 5174
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *white »

Usher wrote: 2023-11-12, 18:29 UTC Have you tried to use substring in Win9x?
It is parsed by Total Commander..
Fla$her
Power Member
Power Member
Posts: 2586
Joined: 2020-01-18, 04:03 UTC

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

TC 11.03 RC1 history wrote:17.01.24 Added: New environment variable %COMMANDER_INI_PATH%: Directory of the settings file wincmd.ini (32/64)
:)
Overquoting is evil! 👎
JOUBE
Power Member
Power Member
Posts: 1561
Joined: 2004-07-08, 08:58 UTC

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *JOUBE »

Wow, very nice at the customer side (no more discussions). Thanks.

Edit:
There is a minor issue: At COMMANDER_INI_PATH is a trailing \, other than at COMMANDER_PATH. It should be removed.?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6683
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Horst.Epp »

JOUBE wrote: 2024-01-18, 15:36 UTC There is a minor issue: At COMMANDER_INI_PATH is a trailing \, other than at COMMANDER_PATH. It should be removed.?
I find it ok
because one can add filenames after it without needing an additional \
Windows 11 Home, Version 24H2 (OS Build 26100.2161)
TC 11.50b4 x64 / x86
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81
QAP 11.6.4 x64
User avatar
beb
Senior Member
Senior Member
Posts: 470
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *beb »

Fla$her wrote: 2024-01-18, 14:49 UTC
TC 11.03 RC1 history wrote:17.01.24 Added: New environment variable %COMMANDER_INI_PATH%: Directory of the settings file wincmd.ini (32/64)
:)
Unbelievable.
I'm gonna use it, though.

Edit:
Sorry, I won't.
Now I've just deleted SetEnv COMMANDER_INI_PATH %"StrLeft(%COMMANDER_INI%, StrLen(%COMMANDER_INI%) - 11)" entry in wdx\Autorun\autorun.cfg that wasn't in use anyway. And that's it.
I'm glad someone else would be happy.
I've been interested in %COMMANDER_PARENT% one, which I'm using a lot.
Last edited by beb on 2024-01-18, 17:38 UTC, edited 1 time in total.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3330
Joined: 2003-05-06, 11:46 UTC

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Sir_SiLvA »

Horst.Epp wrote: 2024-01-18, 16:54 UTC
JOUBE wrote: 2024-01-18, 15:36 UTC There is a minor issue: At COMMANDER_INI_PATH is a trailing \, other than at COMMANDER_PATH. It should be removed.?
I find it ok
because one can add filenames after it without needing an additional \
Its called consistancy :-P
Hoecker sie sind raus!
JOUBE
Power Member
Power Member
Posts: 1561
Joined: 2004-07-08, 08:58 UTC

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *JOUBE »

Pathes under Windows are specified standard without a trailing \... (Only at driveletter:\ it divers)

https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#fully-qualified-vs-relative-paths

Code: Select all

....
Fully Qualified vs. Relative Paths
....
A single backslash, for example, "\directory" or "\file.txt". This is also referred to as an absolute path.
....
Where "\directory" refers to a folder...

Examples: %HOMEPATH% %SystemRoot% %Temp% ....
Last edited by JOUBE on 2024-01-18, 22:25 UTC, edited 7 times in total.
Fla$her
Power Member
Power Member
Posts: 2586
Joined: 2020-01-18, 04:03 UTC

Re: [Tc11] Suggestion: COMMANDER_INI_PATH

Post by *Fla$her »

Horst.Epp wrote: 2024-01-18, 16:54 UTC because one can add filenames after it without needing an additional \
%COMMANDER_INI_PATH%\name.ext reads better than %COMMANDER_INI_PATH%name.ext.
Overquoting is evil! 👎
Post Reply