The feature I would like to request isn't well documented, so if I misunderstood something, my apologies.
This problem occurs when you attempt to use some commands in a sequence for a toolbar button. Apparently, the internal commands can be input with comma divider without limitation, but not all commands with parameters. Let's look at very simple case: we need to select the right TC panel and change its directory to c:\windows. We can call the button dialog and input two these commands in a row with comma divider. But unfortunately, the command line
cm_FocusRight,cd c:\Windows\
doesn't work. It shows an error "File not found! (below is our command line) The system cannot find the file specified." Adding quotes to path or to whole cd... command, as it usually needs for Windows paths, doesn't help. Apparently current TC logic doesn't permit using the cd command in a sequence and, when "cd" is detected, TC attempts to use the whole command line as an argument.
Can this problem be resolved and logic improved?
Allow combine an internal command and "cd directory" for a button
Moderators: Hacker, petermad, Stefan2, white
Allow combine an internal command and "cd directory" for a button
Desktop: Windows 11 Pro 23H2, TC 11.50. Mobile: Pixel 5a, Android 14, TC 3.60b4
Re: Allow combine an internal command and "cd directory" for a button
I'm aware this is a suggestion. Just a note in case you don't know this: Currently there's only one way to work around this. The cm_ command with the parameter must be moved to a user-defined em_ command. Then the resulting commands can be used in sequence.
Example:
cm_FocusRight,em_cdWindows
where em_cdWindows is a user-defined command that makes use of the regular cd C:\Windows command. User-defined commands can be added in TC's command browser (cm_CommandBrowser) in usercmd.ini section.
Regards
Dalai
Example:
cm_FocusRight,em_cdWindows
where em_cdWindows is a user-defined command that makes use of the regular cd C:\Windows command. User-defined commands can be added in TC's command browser (cm_CommandBrowser) in usercmd.ini section.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Allow combine an internal command and "cd directory" for a button
While the above example would work, the reversed one would be unclear:
cd c:\Windows\,cm_FocusRight
because a directory named ",cm_FocusRight" can actually exist! So it's not clear whether the user wants to go to
c:\Windows\,cm_FocusRight
or to
c:\Windows\
and then execute the command cm_FocusRight.
cd c:\Windows\,cm_FocusRight
because a directory named ",cm_FocusRight" can actually exist! So it's not clear whether the user wants to go to
c:\Windows\,cm_FocusRight
or to
c:\Windows\
and then execute the command cm_FocusRight.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Allow combine an internal command and "cd directory" for a button
Right.ghisler(Author) wrote: 2020-09-07, 09:52 UTC ...
because a directory named ",cm_FocusRight" can actually exist!
...
There might be 0,1% possibility that a folder named ",cm_FocusRight" exists,
but there are 99,9% of frustrated users because they can't use the command as simple as it could be.
I would rather ignore the liberty of the 0,1%-users.
Maybe implement a feature to explicitly separate commands:
cd c:\Windows\?,cm_FocusRight
Re: Allow combine an internal command and "cd directory" for a button
The problem is that cd is not the only possible command, some users may want to execute other commands with parameters too, so is not easy to find a good separator. Your "?," looks very confusing, I would prefer to require quotes around path for cd command instead so it would be clear where path ends, but it will work only for cd command:
Code: Select all
cd "c:\windows",cm_FocusRight
Re: Allow combine an internal command and "cd directory" for a button
Exactly.
It would be very reasonable to use the quotes if the command cd directory (and other similar commands which include path or filename) is not alone but used in a sequence. Even if quotes in a particular case are not required for Windows command processor, they may be mandatory here:
cm_FocusRight,cd "c:\Windows\"
It would be very reasonable to use the quotes if the command cd directory (and other similar commands which include path or filename) is not alone but used in a sequence. Even if quotes in a particular case are not required for Windows command processor, they may be mandatory here:
cm_FocusRight,cd "c:\Windows\"
Desktop: Windows 11 Pro 23H2, TC 11.50. Mobile: Pixel 5a, Android 14, TC 3.60b4
Re: Allow combine an internal command and "cd directory" for a button
The only problem is that this won't allow using other commands with arbitrary parameters where quotes may be in the middle.