Jump to archive w/o entering on cd or via cmd line feature

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Jump to archive w/o entering on cd or via cmd line feature

Post by *MVV »

Currently TC jumps to file if we specify command like:

Code: Select all

cd "X:\Path\Name.zip"
But if file is an archive, TC enters archive instead.

I think it would be useful sometimes (and it was requested many times) if cd command allow to jump to just file w/o entering it by appending e.g. ":" sign to its path:

Code: Select all

cd "X:\Path\Name.zip":
(character may be any, but ":" can't be a part of name)

Same thing should work for /L= and /R= command line parameters.
Last edited by MVV on 2010-11-29, 16:12 UTC, edited 1 time in total.
User avatar
GammelBert
Member
Member
Posts: 109
Joined: 2007-02-21, 18:42 UTC
Location: Germany

Post by *GammelBert »

I'd like to request a command line parameter. I want TC to select the file, not open it when it is passed to totalcmd.exe.
Last edited by GammelBert on 2010-11-29, 12:47 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Support+++
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Additional command line parameter may be used as alternative solution. In case of TOTALCMD.exe command line all is pretty simple - parameter may be specified everywhere in command line. But with cd command parameter may be specified after quoted path - currently this part of command line is ignored (only when path is quoted) so command will work with all existing versions:

Code: Select all

cd "F:\Firefox" /a
(parameter name may be changed, it is just an example)

Also parameter support should be added for cd command passed via WM_COPYDATA.
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

In TC 8.50 the /A switch has been added as command line parameter for TOTALCMD.EXE
HISTORY.TXT wrote:08.02.13 Added: New command line parameter /A tells TC to not open archives received via command line, but instead open the directory and place the cursor on the archive (32/64)
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

08.02.13 Added: New command line parameter /A tells TC to not open archives received via command line, but instead open the directory and place the cursor on the archive (32/64)
Unfortunately this does not work for the cd command - only for the totalcmd.exe / totalcmd64.exe command.

I suggest to make it work for cd as well if possible.

It would be much easier to write:

cd somefile.zip /A
than:
%commander_exe% somefile.zip /A /O /S
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, currently not possible - cd supports path with spaces without using double quotes, and "somefile.zip /A" is a valid subdir.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
I think you can allow parameter:

Code: Select all

cd /a archive.zip
It will work only with new TC versions, old ones will simply report an error or do nothing (like now).
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

MVV wrote:I think you can allow parameter:

Code: Select all

cd /a archive.zip
It will work only with new TC versions, old ones will simply report an error or do nothing (like now).
??? It simply opens archive "a archive.zip" in the root.

I noticed different behavior between "cd" on TC's command line and "cd" as button command.
Breadcrumb bar shows "c:\a archive.zip" when the command mentioned above is executed on the command line.
Breadcrumb bar shows "c:\/a archive.zip\*.*" when the command mentioned above is executed as button command. When you edit this path (cm_EditPath) the path is displayed as "c:\/a archive.zip/".

It seems that:
cd on command line: "/" is replaced by "" for local file system
cd as button command: "/" is not replaced for local file system
ghisler(Author) wrote:Sorry, currently not possible - cd supports path with spaces without using double quotes, and "somefile.zip /A" is a valid subdir.
I tried to make such subdir. You need to make subdir "A" in subdir "somefile.zip ". In Windows XP I can't create folders with a trailing space in the name (*). In a unix shell i was able to create such folder (can't with TC's ftp client). The command "cd somefile.zip /A" works when the source panel shows the unix folders in TC's ftp client.

Again I noticed different behavior between "cd" on TC's command line and "cd" as button command when TC's ftp client is active.
"cd folder" on command line: works as expected.
"cd folder" as button command: A "Drive not found" error is displayed. Strangely enough "cd folder/subfolder" or "cd folder/" works OK.

Certainly there are things to consider when adding parameter /A to the cd command. Perhaps TC should first treat it as part of the folder name. If the folder does not exist, treat it as a parameter. Another way and much simpler would be to simply add an new command, e.g. "cda".

(*) I can create folders with a trailing space in the name, but did not know how.
Last edited by white on 2013-11-11, 19:06 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
Christian, please make it working for directories too, i.e. TC should just put focus onto passed object w/o analyzing or entering it with /A parameter. That will be nice addition.
white wrote:In TC 8.50 the /A switch has been added as command line parameter for TOTALCMD.EXE
User avatar
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

MVV wrote:Christian, please make it working for directories too, i.e. TC should just put focus onto passed object w/o analyzing or entering it with /A parameter.
You got my vote +
I can read English, but... I write like Tarzan. (sorry)
User avatar
eugensyl
Power Member
Power Member
Posts: 564
Joined: 2004-06-03, 18:27 UTC
Location: România
Contact:

Post by *eugensyl »

Sombra wrote:
MVV wrote:Christian, please make it working for directories too, i.e. TC should just put focus onto passed object w/o analyzing or entering it with /A parameter.
You got my vote +
Also useful for DOCX files.
This must be an option: jump inside of archive or directly to the archive itself, as file.
My support ++
My Best Wishes,

Eugen
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider it, thanks for the suggestion.
Author of Total Commander
https://www.ghisler.com
User avatar
Sombra
Power Member
Power Member
Posts: 811
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra »

Christian, please make it working for directories too, i.e. TC should just put focus onto passed object w/o analyzing or entering it with /A parameter.
Could be considered it for TC 9?
Last edited by Sombra on 2016-07-11, 19:08 UTC, edited 1 time in total.
I can read English, but... I write like Tarzan. (sorry)
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

Support!!! For archives and directories.
I have write the same suggestion some days ago:
http://www.ghisler.ch/board/viewtopic.php?t=44252
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Post Reply