/A switch only works for single target in command line

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

/A switch only works for single target in command line

Post by *StatusQuo »

(Command line: Setting the cursor on an archive in a running TC instance)
/O /T /A works as expected,
/O /A only works for a single target on the command line.
When settings both panels in one command line, in the right panel the archive is always opened, not just focussed ("/A" ignored).
Help wrote:/A When an archive file is passed as path, do not open it, but instead open the directory containing the archive and set the archive as the active file (place the text cursor on it)
HISTORY.TXT wrote:10.09.13 Fixed: Command line parameters /O /T /A not working together (archives are still opened) (32/64)
TC 9.50b13 (since 8.50, when "/A" was introduced), both 32/64bit, tested with ZIP, RAR, CAB files (no difference).

To reproduce (please adjust path to test files):

Code: Select all

%COMMANDER_EXE% /A /O /L="D:\TC\L\both.zip" /R="D:\TC\R\both.zip"
these command lines are working with no problem

Code: Select all

%COMMANDER_EXE% /A /O /L="D:\TC\L\both.zip"&pause&rem works OK
%COMMANDER_EXE% /A /O /R="D:\TC\R\both.zip"&pause&rem works OK
%COMMANDER_EXE% /A    /L="D:\TC\L\both.zip" /R="D:\TC\R\both.zip"&pause&rem /A works OK (new TC instance)

Some test results:
- No problem with the left panel (respects "/A /O" correctly), this concerns only the right panel.
- No problem when opening a new TC instance (with "/A", leaving out "/O" parameter) - works correctly for both panels.
- No problem when additionally using "/T" to open new tabs
- I found no better parameter combinations in the command line, like /A once or twice, before or after the paths, before or after "/O".
- Cursor position (left or right panel active) doesn't seem to matter.

This ("/O /A") is e.g. used in this script to open the selected files from "Synchronize directories" in another TC instance.
Last edited by StatusQuo on 2020-01-18, 22:39 UTC, edited 1 time in total.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3862
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: /A switch only works for single target in command line

Post by *sqa_wizard »

Code: Select all

%COMMANDER_EXE% /A /O /L="D:\TC\L\both.zip" /R="D:\TC\R\both.zip"
/O /A only works for a single target on the command line.
When settings both panels in one command line:
- in the left panel the archive is always focussed
- in the right panel the archive is always opened, not just focussed ("/A" ignored).

==> confirmed
#5767 Personal license
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: /A switch only works for single target in command line

Post by *StatusQuo »

2sqa_wizard
Thanks, your summary is much better readable. :)

More test results: (Just for information - this doesn't really matter to me, if the one-line solution gets fixed.)
  • When splitting the command into two calls in direct sequence
    - the result may be the same as with a single command line
    - the first call may get ignored, TC executes only the second call
    Not reproducible using Batch (may be slow enough to prevent conflicts),
    but reproducible using AutoHotkey: a "Sleep" has to be used between the calls (minimum 0,1..0,2 seconds).
TcFocusTest_Workaround_2lines.AHK (using 2 separate command lines)

Code: Select all

Run, "c:\totalcmd\totalcmd.exe" /O /A /L="D:\TC\L\both.zip"
;Sleep, 200
Run, "c:\totalcmd\totalcmd.exe" /O /A /R="D:\TC\R\both.zip"
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: /A switch only works for single target in command line

Post by *petermad »

When settings both panels in one command line, in the right panel the archive is always opened, not just focussed ("/A" ignored).
Confirmed :shock:
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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: /A switch only works for single target in command line

Post by *ghisler(Author) »

Confirmed, the command was only ever meant to be used with one parameter. I will add it.
Author of Total Commander
https://www.ghisler.com
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3862
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: /A switch only works for single target in command line

Post by *sqa_wizard »

I can confirm that it is fixed with TC 9.50RC1 (32- and 64-bit) :)
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: /A switch only works for single target in command line

Post by *petermad »

Yes, confirmed fixed in TC 9.5rc1 :-)
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
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Re: /A switch only works for single target in command line

Post by *StatusQuo »

Fix confirmed in TC 9.50rc1. :) Nice, thanks.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply