Page 1 of 1

Option to start with the root folder of the TC drive

Posted: 2024-03-29, 09:18 UTC
by Profane0360
When Total Commander starts, by default it shows in both panels the root folder of drive C. My suggestion is to add a configuration option in wincmd.ini allowing Total Commander to start by showing in both panels the root folder of the drive Total Commander is started from. For example, if TC is started from the D:\Program Files\Total Commander folder, then it would start with D:\ in both panels.

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 09:40 UTC
by Fla$her
This is a very specific request, especially considering locked tabs, virtual folders, ftp and file system plugins.
I read it wrong.

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 13:20 UTC
by petermad
Just start TC like this:
C:\totalcmd\TOTALCMD64.EXE /N %COMMANDER_DRIVE% %COMMANDER_DRIVE%

You can put that in the link you use to start TC with - replace C:\totalcmd\ with the appropriate path

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 14:13 UTC
by Fla$her
2petermad
The drives on the panels can be changed at any time. As far as I understand, it's necessary to take into account the current drives before closing TC.

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 16:48 UTC
by petermad
t's necessary to take into account the current drives before closing TC.
No. the parameters:
/N %COMMANDER_DRIVE% %COMMANDER_DRIVE%
ensure that TC is started with the drive of the starting TC in both panels - but only if TC is not started from a running TC instance (by clicking on totalcmdx64.exe in a folder on the other drive) - in that case the new TC is started with the drive of the running TC.

It will work if you use it in a Desktop or Taskbar .lnk file

So you can make different .lnk files for TC with different destinations like:
Total Commander on C.lnk
Destination: C:\totalcmd\TOTALCMD64.EXE /N %COMMANDER_DRIVE% %COMMANDER_DRIVE%

and:

Total Commander on D.lnk
Destination: D:\totalcmd\TOTALCMD64.EXE /N %COMMANDER_DRIVE% %COMMANDER_DRIVE%

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 17:01 UTC
by Fla$her
No. the parameters:
I don't see any connection with what I wrote. In addition, COMMANDER_DRIVE will not be deployed outside of TC and subprocesses.

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 17:08 UTC
by petermad
COMMANDER_DRIVE will not be deployed outside of TC and subprocesses.
That's not true, when you use it in for example a .lnk file as explained here above - AND you click that link file from outside of TC, then TC will set the %COMMANDER_DRIVE% environment variable BEFORE it reads the command line parameters - why don't you try it, before you abandon it?

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 17:33 UTC
by Fla$her
It works, but my thesis has not ceased to be relevant, because TC recognizes variables, not the system.
In any case, it has nothing to do with saving the current drives before closing. You're proposing constants instead.

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 19:40 UTC
by petermad
You're proposing constants instead.
Well, Profane0360 wants the drive of where the currently used TC is installed (started from) - that is constant - he is NOT asking for the drives TC was in at close down.

The title of this topic is "Option to start with the root folder of the TC drive" I can only interpret "the TC drive" as %COMMANDER_DRIVE%

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-29, 19:54 UTC
by Fla$her
You're right. I reread the first post and realized that the first time I understood "started from" as "started with".
In this case, it makes sense to move this topic here.

Re: Option to start with the root folder of the TC drive

Posted: 2024-03-30, 08:01 UTC
by Profane0360
@petermad: Yes, indeed, that was my intent: "the TC drive" is the %COMMANDER_DRIVE%. Thank you all for the feedback.