Extended CD command

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Extended CD command

Post by *Fla$her »

1) Jump to an object name in the list of the active panel with any content (virtual folder, FS-plugin, ftp):
cd <object name>

2) Jump to an full object name with any content (virtual folder, FS-plugin, ftp):
cd ftp://XXX.XXX.XXX.XXX/xx.ext
cd \\\Virtual Panel\Music\any.flac
cd \\\Registry\HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper
cd ::{4336A54D-038B-4685-AB02-99BB52D3FB8B}\Music\Sample Music\Kalimba.mp3


3)
Jump to an object without opening:
cd0 C:\Path\to\my folder
cd0 \\\Virtual Panel\Arch.zip
cd0 \\\Registry\HKEY_CURRENT_USER\Control Panel
cd0 ::{4336A54D-038B-4685-AB02-99BB52D3FB8B}\Music\Sample Music


4) Support for the above for WM_COPYDATA:
TCFS2.exe /ef "tcd(`[path]`)"

It doesn't seem to me that there is any problem in focusing on an item in the displayed list. I.e. for 2) and 3), you can first display the list, and then move the cursor to the object if there is no other way.
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Extended CD command

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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3293
Joined: 2003-05-06, 11:46 UTC

Re: Extended CD command

Post by *Sir_SiLvA »

Support for case 1 and 2 (which I expected to work allready) but NOT case 3.
CD stands for chdir (change directory), so it makes no sense to use cd without wanting to enter the directory you are point cd at.
Hoecker sie sind raus!
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Extended CD command

Post by *Fla$her »

Sir_SiLvA wrote: ↑2022-10-21, 00:12 UTCbut NOT case 3.
There are 4 of them. ;)
Sir_SiLvA wrote: ↑2022-10-21, 00:12 UTCCD stands for chdir (change directory), so it makes no sense to use cd without wanting to enter the directory you are point cd at.
It has been a long time since it makes no sense to be tied to etymology, since cd can go to files, open sections of FS plugins that are not folders, and filter the contents in the file panel by mask or template.

First of all, this function is correlated with the /P key for %COMMANDER_EXE%. Since cd works much faster, the meaning of the implementation is more than in demand, especially since it concerns not only ordinary folders.
But by and large, it does not matter at all what the command itself will be called (these are trifles), the main thing is that this implementation should see the light. ;)
Last edited by Fla$her on 2022-10-21, 12:21 UTC, edited 1 time in total.
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Extended CD command

Post by *petermad »

2Sir_SiLvA
and 2 (which I expected to work allready)
Actually none of the examples in 2 currently work, because they point to files - cd only work with file names for ordinary local folders (drive:\path\file)

cd0 is the one of the suggestions I like the most, because it replaces %COMMANDER_EXE% /P

I would also like to be able to cd to a file inside an archive: cd c:\totalcmd\Tcmdkey.zip\WINCMD.KEY
Currently cd works for going into folders in .zip files IF the backslash before the folder name is replaced with a / - like cd c:\totalcmd\Tcmdkey.zip/folder. A little inconsistant since if I press Shift+Ctrl-Enter on the folder when inside the archive, TC puts c:\totalcmd\Tcmdkey.zip\folder in the command line - not c:\totalcmd\Tcmdkey.zip/folder
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
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Extended CD command

Post by *Fla$her »

petermad wrote: ↑2022-10-21, 08:55 UTCbecause they point to files
Only Wallpaper is a parameter in the registry. ;)
petermad wrote: ↑2022-10-21, 08:55 UTCbecause it replaces %COMMANDER_EXE% /P
I wrote about it.
petermad wrote: ↑2022-10-21, 08:55 UTCI would also like to be able to cd to a file inside an archive: cd c:\totalcmd\Tcmdkey.zip\WINCMD.KEY
I would include this in the list, but I remember that the author pointed out the problem of getting a long list for large archives. On the other hand, my suggestion to wait for the list to be displayed, and only then look for the name, is also appropriate here.
petermad wrote: ↑2022-10-21, 08:55 UTCCurrently cd works for going into folders in .zip files
Not only in .zip.
petermad wrote: ↑2022-10-21, 08:55 UTCIF the backslash before the folder name is replaced with a / - like cd c:\totalcmd\Tcmdkey.zip/folder.
Yes, and instead of folder, there can be any chain with backslashes (cd C:\Arch.7z/dir1\dir2\dir3\dir4\etc).
Overquoting is evil! πŸ‘Ž
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Extended CD command

Post by *hi5 »

+1
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Re: Extended CD command

Post by *igarny »

Support!
Please!

I find it strange that there should be an internal command:
CD <directory>=-2;Switch to the given directory
but I don't seem to find the way to send a command to change to a plugin based folder
On the other hand the switching from the command line of TC control works like a charm

Would there be a TCFS solution, that can send text to the TC CLI control?
I have come to figure out only this part:

Code: Select all

TCFS2.exe /ef tcm(4003,1) send ('cd \var\logs')
, but I would like this executed on the active panel, which is connected to a plugin service
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Extended CD command

Post by *Fla$her »

2igarny
With rare exceptions, there should be no problems with opening the folders of wfx plugins. TCFS2 and the command line are not required for this. It's enough to drag such a folder to the button bar.
Overquoting is evil! πŸ‘Ž
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3293
Joined: 2003-05-06, 11:46 UTC

Re: Extended CD command

Post by *Sir_SiLvA »

igarny wrote: ↑2023-05-12, 20:35 UTC I find it strange that there should be an internal command:
CD <directory>=-2;Switch to the given directory
but I don't seem to find the way to send a command to change to a plugin based folder
Then you most likely did something wrong.

Example:
In my WinCmd.Ini I have this entry for the ADBPlugin

Code: Select all

[FileSystemPlugins]
Android=%COMMANDER_PATH%\PlugIns\FileSystem\ADB\ADBPlugin.wfx
and with CD \\\Android I can now switch to the folder of the ADB-Plugin.

HTH!
Hoecker sie sind raus!
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Re: Extended CD command

Post by *igarny »

Thanks for the prompt replies guys! Probably I did not express myself well enough...
I should have mentioned that I want to connect to a specific service / plugin, which connects me to a variety of remote servers

@Fla$her:
It's enough to drag such a folder to the button bar.
It is not sufficient... it makes little sense to create a button for each server and folder I have frequent need to connect.

@Sir_SiLvA: yes that is close... and I know this, but then there is a huge challenge.... how do one go through all of the possible variations for servers behind that service... The ADBPlugin is a good example for a static hierarchy behind it, but even there....Imagine you have dozens of root level folder each of them having \var\log\ subfolder behind them...
Now what is the menu command / button you would put there to quickly jump to this location on each of these root folders?

The above command: cd \var\log I can run at the TC command line control successfully and as expected, but not from a menu / button command.

Again I would like to support with both hands the inquiry / interest of @Fla$her
Last edited by igarny on 2023-05-13, 06:45 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Extended CD command

Post by *Fla$her »

igarny wrote: ↑2023-05-13, 05:59 UTCit makes little sense to create a button for each server and folder I have frequent need to connect.
It makes sense, because by creating a button, you will immediately receive a command with a path when you edit it, spending much less time compared to manual input. And what to do with the button itself is secondary.
igarny wrote: ↑2023-05-13, 05:59 UTCAgain I would like to support with both hands the inquiry / interest of @Fla$her
This is good, I'm waiting for the author to finally respond to this important request, but it only concerns the non-working patterns presented in the list and to a greater extent for buttons, custom commands and directory hotlist.
Overquoting is evil! πŸ‘Ž
igarny
Junior Member
Junior Member
Posts: 58
Joined: 2023-01-26, 19:01 UTC

Re: Extended CD command

Post by *igarny »

@Fla$her:
because by creating a button, you will immediately receive a command with
unfortunately it doesn't work to have a change directory button for a relative path in plugin based location
check my reply to @Sir_SiLvA:
here viewtopic.php?p=431162#p431162

Hence I am looking for a way to send the cd \var\log to the TC command line dialog / control and execute it from there..
there it works....
I would like to avoid specifying the server name part, since I am already in a different location on that same server
Fla$her
Power Member
Power Member
Posts: 2297
Joined: 2020-01-18, 04:03 UTC

Re: Extended CD command

Post by *Fla$her »

2igarny
Are you writing about an ftp server, NetBIOS, or a shared folder on a server drive?
It is unlikely that something from the button works worse than from the command line. Usually the opposite.

P. S.: The nickname is inserted by clicking on it under the profile icon.
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Extended CD command

Post by *petermad »

P. S.: The nickname is inserted by clicking on it under the profile icon.
That is if you are using the "AllanStyle - SUBSILVER" or the "Black" Board style - if you are using one of the "prosilver" Board styles it is inserted by clicking the username right under the post title. In all Board styles it is the user name that has an asterisk to the left, that has to be clicked to insert the username.
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
Post Reply