[TC11.03] CD command needs to be capitalized

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

[TC11.03] CD command needs to be capitalized

Post by *jonathanpoulin »

Hi,

I found a little "problem". If you go to a network location. In my case, I go to "\\\Secure FTP\" (SFTP plugin). From there, by example, if I want to navigate to "\\\Registry\" (Registry plugin) from the TC command line, I need to do:

Code: Select all

CD \\\Registry\
Note the capitalized CD command. If I use "cd" or "Cd" by example, it won't work. In other words, in that use case, this is case-sensitive.

Within an em_command, I can use cd \\\Registry\. Calling the command change dir as expected.

Additionally, when in a drive location, like C:\, there is no problem. To change dir, I can use "CD", "cd", etc.
Thanks,
Jonathan Poulin
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.03] CD command needs to be capitalized

Post by *white »

Confirmed. And if you first do:

Code: Select all

cd \\\Registry\HKEY_USERS\
and then do:

Code: Select all

cd \\\Secure FTP\
You end up in: \\\Registry\
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC11.03] CD command needs to be capitalized

Post by *jonathanpoulin »

white wrote: 2024-07-15, 20:30 UTC Confirmed. And if you first do:

Code: Select all

cd \\\Registry\HKEY_USERS\
and then do:

Code: Select all

cd \\\Secure FTP\
You end up in: \\\Registry\
Thanks for the confirmation.

And good catch! So, what it does in this case is going to the root.

First, do ("cd" in any casing):

Code: Select all

CD \\\Registry\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
And then ("cd" not in UPPERCASE):

Code: Select all

cd \\\Secure FTP\
You end up in: \\\Registry.
Thanks,
Jonathan Poulin
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: [TC11.03] CD command needs to be capitalized

Post by *JOUBE »

This is - of course - a problem of the registry plugin. Please contact the author of the registry plugin about this issue.

Jou"Like - for example - at the SFTP plugin, the Tc commandline is "part" of the plugin, if you are in a connection"be
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.03] CD command needs to be capitalized

Post by *white »

JOUBE wrote: 2024-07-15, 21:20 UTC This is - of course - a problem of the registry plugin. Please contact the author of the registry plugin about this issue.
In that case, also a problem of Mr. Ghisler's plugins, for example the plugins webDAV and Secure FTP.
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: [TC11.03] CD command needs to be capitalized

Post by *JOUBE »

white wrote: 2024-07-15, 21:50 UTC
JOUBE wrote: 2024-07-15, 21:20 UTC This is - of course - a problem of the registry plugin. Please contact the author of the registry plugin about this issue.
In that case, also a problem of Mr. Ghisler's plugins, for example the plugins webDAV and Secure FTP.
A problem of the SFTP plugin? Oh no... It is a great and very good feature, that the TCs command line becomes a part of the - eg SFTP - plugin: It is then possible to send commands via ssh via bash to the server...

Jou"Maybe you never tried it, never used it, make use of it?"be
User avatar
Dalai
Power Member
Power Member
Posts: 9943
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC11.03] CD command needs to be capitalized

Post by *Dalai »

It might be a plugin problem, but that's not the only explanation. WFX plugins can support commands given via TC's command line; they're executed in the WFX plugin context. The SFTP plugin certainly does support them, and I think the WebDAV plugin does as well. Not sure about the Registry plugin. Good luck contacting the Registry plugin author. I tried that more than two years ago due to a bug I found, but I got no response in the corresponding forum thread and my mail didn't even make it through.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.03] CD command needs to be capitalized

Post by *white »

JOUBE wrote: 2024-07-15, 22:06 UTC A problem of the SFTP plugin? Oh no... It is a great and very good feature, that the TCs command line becomes a part of the - eg SFTP - plugin: It is then possible to send commands via ssh via bash to the server...
Okay, so "cd" is executed by the plugin and "CD" by Total Commander? Is this documented somewhere?
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: [TC11.03] CD command needs to be capitalized

Post by *JOUBE »

It's like this: if the command that was issued in the plugin command line comes back with an error, unknown or similar, then the command is executed locally. Everyone who uses plugins knows this.

Dat Thema is duach, as they say...

Jou"It didn't interest you until yesterday and it won't interest you tomorrow..."be
miskox
Member
Member
Posts: 191
Joined: 2003-06-11, 06:00 UTC

Re: [TC11.03] CD command needs to be capitalized

Post by *miskox »

What about CHDIR command?

Saso
#224551
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.03] CD command needs to be capitalized

Post by *white »

JOUBE wrote: 2024-07-15, 22:19 UTC It's like this: if the command that was issued in the plugin command line comes back with an error, unknown or similar, then the command is executed locally.
Seems like a good idea to add that information to the help page about the Command line.
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC11.03] CD command needs to be capitalized

Post by *jonathanpoulin »

white wrote: 2024-07-16, 11:42 UTC Seems like a good idea to add that information to the help page about the Command line.
I agree.
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC11.03] CD command needs to be capitalized

Post by *jonathanpoulin »

By the way, the problem is there also if we are at "\\\Secure FTP\test.rebex.net\pub\" and do the following on command line (lowercase "cd"):

Code: Select all

cd C:\Windows
It tries to change to dir "\pub\C:\Windows". I see that at the top in TC:

Code: Select all

Get directory: \pub\C:\Windows
Directory not opened: Failed opening remote file
Thanks,
Jonathan Poulin
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC11.03] CD command needs to be capitalized

Post by *white »

jonathanpoulin wrote: 2024-07-16, 15:02 UTC By the way, the problem is there also if we are at "\\\Secure FTP\test.rebex.net\pub\" and do the following on command line (lowercase "cd"):

Code: Select all

cd C:\Windows
It tries to change to dir "\pub\C:\Windows".
By now that shouldn't be a surprise to you. I don't think there's anything wrong with it, I just think some documentation should be added.

If you do it the other way around it can also be confusing. For example, connect to an FTP server via the internal FTP client. You can type "cd dirname" to change to a folder. But if you type "CD dirname" you will get the error "Drive not found! 0:".
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: [TC11.03] CD command needs to be capitalized

Post by *JOUBE »

Although "dat Thema duach is" here still the classic, so that it's not always about cd/CD/chdir, which is somehow very low flighing...

Before I present the classic, the following comment: I am strictly against anything being added about the topic in the help or anywhere else. Anyone who uses plugins and has even a little overview will immediately understand the connections and be able to organize them, instead of creating a bug report here. That's just ridiculous.

The classic: If there is a connection with the SFTP plugin, then you can of course - by accident - simply press enter on a script in the current remote directory, as you would do it normaly with Windows and the TC. Unfortunately, this doesn't work, even if you have the necessary rights to read and execute the script on the server. The reason is simple: for good reasons, the current directory is not part of the path in Linux for security reasons. The script is simply not found and that is intentional in Linux. (Instead, in this case you have to explicitly specify the path to the current directory. The easiest way to do this is to prefix the script with .\).

In the case of the SFTP plugin, this means that since the script is not executed on the server, the TC receives this message and now executes the script locally. Because the Windows Subsystem for Linux is often activated, this works in principle, more poorly than well with lots of error messages. Most of the time nothing breaks... neither on the server nor on the local Windows PC.
Post Reply