How can I refer to the ini files location
Moderators: Hacker, petermad, Stefan2, white
An additional interesting thing (according to me) is as follows for a button definition :
- Command : %COMMANDER_INI%\..\UserSub.bar
- Start path : %COMMANDER_INI%\.\
Please attention to "\..\" and "\.\" :
Command requires two points, but, Start path requires one point!
I am not sure this is normal or not, I am not so experienced about relative paths...
- Command : %COMMANDER_INI%\..\UserSub.bar
- Start path : %COMMANDER_INI%\.\
Please attention to "\..\" and "\.\" :
Command requires two points, but, Start path requires one point!
I am not sure this is normal or not, I am not so experienced about relative paths...
Only partially correct.HBB wrote:- Command : %COMMANDER_INI%\..\UserSub.bar
- Start path : %COMMANDER_INI%\.\
Please attention to "\.." and "\." :
Command requires two points, but, Start path requires one point!
The command "%COMMANDER_INI%\..\UserSub.bar" requires two dots, correct, provided the UserSub.bar is located in the same folder as the wincmd.ini file.
The start path is syntactically incorrect, because you cannot refer to a file by using a single dot. Yet, as the start path is not needed in this case at all, the incorrect start path will not do any harm.
Karl
The screenshot reveals that you somehow managed to confuse T.C. and/or Windows, because %COMMANDER_INI% resolves to C:\windows\P:/Files/Programs/Totalcmd/wincmd.ini.HBB wrote:To Mikefield :
You can find Image of "set c"
This fully qualified filename is pretty obviously nonsense.
Perhaps you should simply stick to the Windows rule that the path separator is the backslash.
Karl
Hello karl,
But, this kind of mistakes may occur in some cases, programs may be carefull about them. In fact, TC was mostly succesfull, because it resolved wincmd.ini for reading contents.
EDITED <<< Since it was succesfull, I couldn't detect my fault >>>
Best regards
Linux + Windows = confusing "\" and "/". This is a mistake for windows...The screenshot reveals that you somehow managed to confuse T.C. and/or Windows
But, this kind of mistakes may occur in some cases, programs may be carefull about them. In fact, TC was mostly succesfull, because it resolved wincmd.ini for reading contents.
EDITED <<< Since it was succesfull, I couldn't detect my fault >>>
Did you try it? Please try...The start path is syntactically incorrect, because you cannot refer to a file by using a single dot
Best regards
Hello, HBB.
A dot always refers to the current folder. I filename is not a folder. Hence %COMMANDER_INI%\. is an invalid object.
A correct start path for your command would be %COMMANDER_INI%\.. %COMMANDER_INI%\. is not a valid start path. It is not a valid foldername at all.
T.C. will ignore the invalid start path. As the commandline holds a fully qualified valid filename %COMMANDER_INI%\..\UserSub.bar in you case the start path can be safely ignored and left blank.
Kind regards,
Karl
-
P.S.:
%COMMANDER_PATH%\.. is a dirty little trick that does work, whereas %COMMANDER_PATH%\. does not.
%COMMANDER_INI% is a fully qualified filename. E.g. it isDid you try it? Please try...The start path is syntactically incorrect, because you cannot refer to a file by using a single dot
here.C:\>echo %COMMANDER_INI%
C:\Programme\Tc750\wincmd.ini
A dot always refers to the current folder. I filename is not a folder. Hence %COMMANDER_INI%\. is an invalid object.
ButC:\>cd %COMMANDER_INI%\.
The foldername is invalid.
Conclusion:C:\>cd %COMMANDER_INI%\..
C:\Programme\Tc750>
A correct start path for your command would be %COMMANDER_INI%\.. %COMMANDER_INI%\. is not a valid start path. It is not a valid foldername at all.
T.C. will ignore the invalid start path. As the commandline holds a fully qualified valid filename %COMMANDER_INI%\..\UserSub.bar in you case the start path can be safely ignored and left blank.
Kind regards,
Karl
-
P.S.:
%COMMANDER_PATH%\.. is a dirty little trick that does work, whereas %COMMANDER_PATH%\. does not.
Hi, HBB.
T.C. resolves %COMMANDER_II%\.\ like this:
+ %COMMANDER_II%\. is invalid and yields an empty string as a result
+ This leaves the single backslash \, i.e. the root folder of the drive.
Telling from your pathnames which we have learnt so far, what T.C. is showing you are foldernames which can be found in the root folder of your P: drive.
Kind regards,
Karl
--
P.S.:
I verified that this is how T.C. inteprets %COMMANDER_INI%\.\ by applying it to a button here on my system. I ended up being shown the files and folders located in the root folder of drive C:.
T.C. resolves %COMMANDER_II%\.\ like this:
+ %COMMANDER_II%\. is invalid and yields an empty string as a result
+ This leaves the single backslash \, i.e. the root folder of the drive.
Telling from your pathnames which we have learnt so far, what T.C. is showing you are foldernames which can be found in the root folder of your P: drive.
Kind regards,
Karl
--
P.S.:
I verified that this is how T.C. inteprets %COMMANDER_INI%\.\ by applying it to a button here on my system. I ended up being shown the files and folders located in the root folder of drive C:.
Hello Karl,
As I said before, I am not so experienced about relative paths.
You seem to be right, "%COMMANDER_INI%\.\" refers to root folder.
Edited >>> "%COMMANDER_INI%\..\" also refers to root folder
Very interesting, in my first attempt, I remember to see actually the folder of "wincmd.ini" in "Start path", but not now...
Anyway, thank you very much for your warnings and help.
Best regards...
As I said before, I am not so experienced about relative paths.
You seem to be right, "%COMMANDER_INI%\.\" refers to root folder.
Edited >>> "%COMMANDER_INI%\..\" also refers to root folder
Very interesting, in my first attempt, I remember to see actually the folder of "wincmd.ini" in "Start path", but not now...
Anyway, thank you very much for your warnings and help.
Best regards...
Hello Karl,
Please watch this (or directly download swf)
This misleaded me...
I think that TC needs the Christian's help.
Kind regards
Please watch this (or directly download swf)
"%COMMANDER_INI%\.\" for "Start Path" always show the active panel directory!Very interesting, in my first attempt, I remember to see actually the folder of "wincmd.ini" in "Start path", but not now...
This misleaded me...
I think that TC needs the Christian's help.
Kind regards
Hi, HBB.
Sorry to say so, but you still seem to be missing the point:
%COMMANDER_INI%\.\ is a piece of crap, syntactical nonsense. When reading it, T.C. drops the senseless part, %COMMANDER_INI%\., and only keeps the meaningful rest. This is a single backslash. A single backslash alone used as a foldername always means the root folder of the current drive.
(Yet, I vaguely remember having explained all this before.)
%COMMANDER_INI%\..\ does not always point to the root folder. It might point to the root folder on your system, but it definitely does not do so on mine (as can be told from one of my previous posts).
Yet, even on your system, %COMMANDER_INI%\.. should not point to any root folder, because your wincmd.ini file is located here: P:\Files\Programs\TotalCmd\wincmd.ini.
Therefore %COMMANDER_INI%\.. should point here on your system: P:\Files\Programs\TotalCmd.
This is true provided your %COMMANDER_INI% variable holds the correct value by now and no longer the garbled string that used to be in it.
Kind regards,
Karl
Sorry to say so, but you still seem to be missing the point:
%COMMANDER_INI%\.\ is a piece of crap, syntactical nonsense. When reading it, T.C. drops the senseless part, %COMMANDER_INI%\., and only keeps the meaningful rest. This is a single backslash. A single backslash alone used as a foldername always means the root folder of the current drive.
(Yet, I vaguely remember having explained all this before.)
%COMMANDER_INI%\..\ does not always point to the root folder. It might point to the root folder on your system, but it definitely does not do so on mine (as can be told from one of my previous posts).
Yet, even on your system, %COMMANDER_INI%\.. should not point to any root folder, because your wincmd.ini file is located here: P:\Files\Programs\TotalCmd\wincmd.ini.
Therefore %COMMANDER_INI%\.. should point here on your system: P:\Files\Programs\TotalCmd.
This is true provided your %COMMANDER_INI% variable holds the correct value by now and no longer the garbled string that used to be in it.
Kind regards,
Karl
Hi Karl,
%COMMANDER_INI% behaves as you described, this is OK. I tried this by batch files, no problem...
But, in button editor, a wrong dropdown menu is listed when "%COMMANDER_INI%\..\" is written into "Start Path".
I am trying to say this may cause a misunderstanding as I did.
According to me, TC should show correct drop down list (or no dropdown list if nonsense).
Best regards
%COMMANDER_INI% behaves as you described, this is OK. I tried this by batch files, no problem...
But, in button editor, a wrong dropdown menu is listed when "%COMMANDER_INI%\..\" is written into "Start Path".
I am trying to say this may cause a misunderstanding as I did.
According to me, TC should show correct drop down list (or no dropdown list if nonsense).
Best regards
Try %COMMANDER_INI%\.. without the quotation marks and the trailing backslash - that works for me.But, in button editor, a wrong dropdown menu is listed when "%COMMANDER_INI%\..\" is written into "Start Path".
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar