How can I refer to the ini files location
Moderators: Hacker, petermad, Stefan2, white
How can I refer to the ini files location
I want to refer to the ini files location because I'm doing a shortcut in the button bar that opens notepad++ (the editor I use) with the wincmd.ini, and I have to pass the path as a parameter, so I need to know how I refer to the ini locations files, but the relative path, like %COMMANDER_PATH% but the location of the ini files.
Thank's, I'll appreciate your help
Thank's, I'll appreciate your help
2aamoncad
Actually %COMMANDER_INI% is the ini file itself (with path) - if you want the path without the file name use: %COMMANDER_INI%\..
Actually %COMMANDER_INI% is the ini file itself (with path) - if you want the path without the file name use: %COMMANDER_INI%\..
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
You have to use "%COMMANDER_INI%"\..wcx_ftp.iniaamoncad wrote:I tried that but it doesn't work for me, I tried to edit the wcx_ftp.ini from a shortcut like this "notepad++ path" %COMMANDER_INI%\wcx_ftp.ini
it works when I edit the wincmd.ini like this "notepad++ path" %COMMANDER_INI%
??
Note the " and the use of ..
When I run TC as follows :
P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wincmd.ini /F=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wcx_ftp.ini
And when I put a button into button bar as follows :
cd %COMMANDER_INI%\..\
Then I press that button, active panel goes to c:\WINDOWS\
What is my fault here? Is there anyone who have any idea?
OS: WinXP SP3
InstallDir=P:\Programs\TotalCmd
UseIniInProgramDir=7
Edited >> TC7.5 Final
P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wincmd.ini /F=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wcx_ftp.ini
And when I put a button into button bar as follows :
cd %COMMANDER_INI%\..\
Then I press that button, active panel goes to c:\WINDOWS\
What is my fault here? Is there anyone who have any idea?
OS: WinXP SP3
InstallDir=P:\Programs\TotalCmd
UseIniInProgramDir=7
Edited >> TC7.5 Final
Hello, HBB.
Reason:
You cannot use variables like %COMMANDER_PATH% and %COMMANDER_DRIVE% outside of T.C. They mean nothing to Windows.
To find out which INI-files the running T.C. instance uses, go to Help => About.
Kind regards,
Karl
T.C. will not use the INI-files which you expect.When I run TC as follows :
P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wincmd.ini /F=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wcx_ftp.ini
Reason:
You cannot use variables like %COMMANDER_PATH% and %COMMANDER_DRIVE% outside of T.C. They mean nothing to Windows.
To find out which INI-files the running T.C. instance uses, go to Help => About.
because T.C. uses a wincmd.ini inside the Windows folder really? To find out which INI-files the running T.C. instance uses, go to Help => About.And when I put a button into button bar as follows :
cd %COMMANDER_INI%\..\
Then I press that button, active panel goes to c:\WINDOWS\
Kind regards,
Karl
Karl, thank you very much for your explanations.
Ini location in "Help>About" is as follows : C:\WINDOWS\P:/Files/Programs/TotalCmd/wincmd.ini
I always see it and can not understand how TC resolves it.
You wrote :
%COMMANDER_INI% is the problem. You wrote :
When I define "wincmd.ini" as command line parameter, TC considers the contents of "wincmd.ini" but not the path of it... Why? I did not really understand..
Best regards
Ini location in "Help>About" is as follows : C:\WINDOWS\P:/Files/Programs/TotalCmd/wincmd.ini
I always see it and can not understand how TC resolves it.
You wrote :
I think that I did not use these variables outside of TC. I used them in TC's button definitions. TC should know the meaning of these variables by considering TotalCmd.exe's path and drive. In fact TC resolves them as I expect, because there is no trouble about %COMMANDER_PATH% and %COMMANDER_DRIVE%.You cannot use variables like %COMMANDER_PATH% and %COMMANDER_DRIVE% outside of T.C. They mean nothing to Windows.
%COMMANDER_INI% is the problem. You wrote :
Since I put the "path\wincmd.ini" as the command line parameter, I hoped that TC should consider it as %COMMANDER_INI%. But not...T.C. will not use the INI-files which you expect.
When I define "wincmd.ini" as command line parameter, TC considers the contents of "wincmd.ini" but not the path of it... Why? I did not really understand..
Best regards
- ghisler(Author)
- Site Admin
- Posts: 50830
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Strange, maybe it's because you are using forward slashes?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
To Mikefield :
You can find Image of "set c"
To Ghisler :
- TC is not installed (there is nothing in Add/Remove Programs)
- TC is executed as portable as follows : P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wincmd.ini /F=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wcx_ftp.ini
- In registry ..blabla../Software/Ghisler/Total Commander : InstallDir=P:\Programs\TotalCmd, IniFileName=.\wincmd.ini, FtpIniName=.\wcx_ftp.ini
- There is no wincmd.ini and wcx_ftp.ini in C:\Windows
- %COMMANDER_INI%\..\ returns as C:\Windows in TC's Button.
Edited >>> To Ghisler : You are right!
When I run : P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%\Files\Programs\TotalCmd\wincmd.ini /F=%COMMANDER_DRIVE%\Files\Programs\TotalCmd\wcx_ftp.ini
"%COMMANDER_INI%\..\" returns as "p:\Files\Programs\TotalCmd\"
Interesting...
You can find Image of "set c"
To Ghisler :
- TC is not installed (there is nothing in Add/Remove Programs)
- TC is executed as portable as follows : P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wincmd.ini /F=%COMMANDER_DRIVE%/Files/Programs/TotalCmd/wcx_ftp.ini
- In registry ..blabla../Software/Ghisler/Total Commander : InstallDir=P:\Programs\TotalCmd, IniFileName=.\wincmd.ini, FtpIniName=.\wcx_ftp.ini
- There is no wincmd.ini and wcx_ftp.ini in C:\Windows
- %COMMANDER_INI%\..\ returns as C:\Windows in TC's Button.
Edited >>> To Ghisler : You are right!
When I run : P:\Programs\TotalCmd\TOTALCMD.EXE /I=%COMMANDER_DRIVE%\Files\Programs\TotalCmd\wincmd.ini /F=%COMMANDER_DRIVE%\Files\Programs\TotalCmd\wcx_ftp.ini
"%COMMANDER_INI%\..\" returns as "p:\Files\Programs\TotalCmd\"
Interesting...