Agree - that should not be so%COMMANDER_INI_PATH% = D:\
%COMMANDER_INI_PATH%\file.ext = D:\\file.ext
[Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH
Moderators: white, Hacker, petermad, Stefan2
Re: [Implemented in Tc11.03RC2] [Tc11] Suggestion: COMMANDER_INI_PATH
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
But returning D: instead of D:\ would also be wrong! That's why I first added the backslash to the variable.
Btw, Total Commander removes duplicate backslashes from the above situation when replacing environment variables.
Btw, Total Commander removes duplicate backslashes from the above situation when replacing environment variables.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
Not excactly.Btw, Total Commander removes duplicate backslashes from the above situation when replacing environment variables.
This button:
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C echo %COMMANDER_INI_PATH%\file && pause
%COMMANDER_EXE%,2
Test %COMMANDER_INI_PATH%
This button does not:
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C
echo %|COMMANDER_INI_PATH|\file && pause
%COMMANDER_EXE%,2
Test %COMMANDER_INI_PATH%
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C
echo %%COMMANDER_INI_PATH%%\file && pause
%COMMANDER_EXE%,2
Test %COMMANDER_INI_PATH%
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
Wrong/not wrong: doesn’t matter. It's about practice: and D: is better in this case as D:\
Just my 2 cents
Joube
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
Code: Select all
C:\Users\Public>cd d:\
C:\Users\Public>d:\
"d:\" is not an internal or external command, executable program, or batch file.
C:\Users\Public>d:
d:\>c:
C:\Users\Public>cd d:
d:\
C:\Users\Public>
d:\ => does not work + at least we have some comments about the failing result.
d: => DOES work! we switched to the next disk! And we fall into the root of this disk.
c: => also DOES work and LOOK! we returned back into the previously active folder! NOT in the root of this disk!!!!
cd d: => does not work + we have very strange "comment" (yep, it looks like as a hint - WHAT I should enter as a command
parameter - but we already for sure know that this variant is NOT working, so what is that?)
so obviously that we must return disk D: without \
#146217 personal license
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
OK, I have tested now how %COMMANDER_PATH% handles it: It doesn't append a backslash in the root. So while it's technically incorrect (D: is just the drive and D:\ the drive root) I will change it to that also in %COMMANDER_INI_PATH%.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
You can add this to the description in the help and explicitly point out the “technical” part.ghisler(Author) wrote: ↑2024-01-25, 08:47 UTC OK, I have tested now how %COMMANDER_PATH% handles it: It doesn't append a backslash in the root. So while it's technically incorrect (D: is just the drive and D:\ the drive root) I will change it to that also in %COMMANDER_INI_PATH%.
By the way, others handle it completely differently, if I see it right, for example: java always appends a backslash, which it also not "technically correct".
So it is the apps choice itself, and also app specific taditionally.
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
I'm trying to read the value for COMMANDER_INI_PATH from the registry in these locations:
but they always come up empty, but when I do a simple echo %COMMANDER_INI_PATH% on a command line it is displayed correctly."HKEY_CURRENT_USER\Environment"
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Where are these values stored? Otherwise I have to resort to the IniFileName in "HKEY_CURRENT_USER, Software\Ghisler\Total Commander"
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
2hi5
The variables are stored nowhere* there [see a quote from Microsoft Learn below].
Each time the TotalCommander starts it creates a set of its variables in the current process scope.
The variables are alive and accessible for a user (via %commander_*%, $env:commander_*, etc) while the TotalCommander process is running.
As soon as the TotalCommander process ends its variables are gone.
Image: https://i.imgur.com/q3ECdO7.png
Image: https://i.imgur.com/eD3ZM0t.png
The variables are stored nowhere* there [see a quote from Microsoft Learn below].
Each time the TotalCommander starts it creates a set of its variables in the current process scope.
The variables are alive and accessible for a user (via %commander_*%, $env:commander_*, etc) while the TotalCommander process is running.
As soon as the TotalCommander process ends its variables are gone.
Image: https://i.imgur.com/q3ECdO7.png
Image: https://i.imgur.com/eD3ZM0t.png
Note. If a user uses a truly portable setup there also might be no Software\Ghisler registry entries at all, and even if some data is there it might not reflect actual locations when a user has several copies of the TotalCommander, and/or relocates TotalCommander after the primary installation.Machine: The environment variable is stored or retrieved from the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment key in the Windows operating system registry.
User: The environment variable is stored or retrieved from the HKEY_CURRENT_USER\Environment key in the Windows operating system registry.
*Process: The environment variable is stored or retrieved from the environment block associated with the current process.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Tc11] Suggestion: COMMANDER_INI_PATH
Actually the variables are stored in the called app's environment, they don't disappear when Total Commander closes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH
Implemented in Tc11.03rc3: Tc11 Suggestion: COMMANDER_INI_PATH
Thanks.
Joube
Thanks.
Joube
Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH
Moderator message from: petermad » 2024-01-30, 14:18 UTC
24 posts about the CD command split to "Behavior of CD command for C: v.s C:\"
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH
Together with the other new environment variables (COMMANDER_INI_PATH together with COMMANDER_INSTANCE, COMMANDER_OPEN, COMMANDER_SESSIONNAME) it is now perhaps almost nearly too much? I don't mean the size of the consumption of characters in the environment but the number of elements themselves. Maybe should be careful with the number of elements for one single App so that it doesn't become conspicuous and cause astonishment?
It is true, it's only within TC. But TC is very often used as a starter of apps and with scripts and so on.
It is true, it's only within TC. But TC is very often used as a starter of apps and with scripts and so on.
[OT] Re: [Implemented in Tc11.03rc3] [Tc11] Suggestion: COMMANDER_INI_PATH
2JOUBE
So you think Windows will throw a Greta Thunberg
So you think Windows will throw a Greta Thunberg
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar