FTP settings, wcx_ftp.ini, include file

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
kratochviljan
Junior Member
Junior Member
Posts: 3
Joined: 2024-11-20, 21:06 UTC

FTP settings, wcx_ftp.ini, include file

Post by *kratochviljan »

I have encountered several times the need to transfer the definition of the FTP connection, i.e. the wcx_ftp.ini file, between different installations of Total Commander. I thought it would be nice to be able to define within this file the path to another file, of the same format as wcf_ftp.ini (to keep things simple), which would act as an include if found. That is, it would be possible to reference a file containing a set of, say, common connection definitions across Total Commander installations. The path to the file would be arbitrarily definable and it would be up to the user to ensure the existence of the definition file. For example, say wcx_ftp_include.tc. The file could be on a network drive or a synchronized directory. Alternatively, this include file could appear as a separate folder in the connection list. Newly created connections would still be stored as before, i.e. in wcx_ftp.ini on the "standard" path - no change. This function would therefore just add a group of, say, frequent or shared connections to the definition file, without the need to copy them. I hope I didn't write it in a clear way. Thanks.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: FTP settings, wcx_ftp.ini, include file

Post by *ghisler(Author) »

While this wouldn't be difficult to add, it would create a problem when the same connection name exists in both the main wcx_ftp.ini and the linked ini file(s). Also these extra connections would have to be distinguishable for the user somehow.

One idea would be to put the linked file on a folder. This way, all connections and their folders would appear within that folder only. The downside would be that it could not appear in multiple folders, but it would make it easy to load the file only when the user opens the folder.

Another idea would be to merge the lists and give the connections from the extra file a special prefix or suffix. Or merge them and only add a suffix when there are name collisions.
Author of Total Commander
https://www.ghisler.com
kratochviljan
Junior Member
Junior Member
Posts: 3
Joined: 2024-11-20, 21:06 UTC

Re: FTP settings, wcx_ftp.ini, include file

Post by *kratochviljan »

Yes, the folder solution came to my mind too and I think it would be good. The fact that the connections would not be in multiple folders probably doesn't necessarily matter. So maybe it would be enough to make a link between the folder and the file that defines its content. So maybe when creating the folder, offer the path to the file that will fill it / define this folder content? The second thing is how to edit / create it in a user friendly way. I can imagine to create and edit the file manually and then link to it, but this is not a very friendly way. Or start with a clean file and drag&drop the existing connection, as it is now, and "populate" it that way? Anyway, I'm glad you don't think this is completely stupid idea :)
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: FTP settings, wcx_ftp.ini, include file

Post by *JOUBE »

Is it even worth bothering with FTP/FTPS anymore? FTP is becoming less and less used (see Firefox has removed it on the userside for example) and rightly so, and is being replaced by an SSH-based approach. But of course: with the SFTP plugin, loadable parts would be also useful.

I would imagine it like this for all affected ini files (wcx_ftp.ini and sftpplug.ini):

Any (any number of) sub-files can be specified in the main ini (wcx_ftp.ini and sftpplug.ini ), which are read at the point where they are in the file. A section of a server that is read later in the sequence overwrites an earlier one. If a file is not present, it is not processed without an error message. Environment variables for the names of the specified sub-ini files are permitted. This allows you to load customer-specific files depending on the environment.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: FTP settings, wcx_ftp.ini, include file

Post by *ghisler(Author) »

Is it even worth bothering with FTP/FTPS anymore?
Yes, many hosters use control panels like CPanel or Plesk, and they allow users to upload files with FTP/FTPS. While SFTP is getting more common, it requires secure shell (SSH) access to the account, which many hosters don't want to offer to their users.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: FTP settings, wcx_ftp.ini, include file

Post by *JOUBE »

ghisler(Author) wrote: 2024-11-22, 09:31 UTC
Is it even worth bothering with FTP/FTPS anymore?
Yes, many hosters use control panels like CPanel or Plesk, and they allow users to upload files with FTP/FTPS. While SFTP is getting more common, it requires secure shell (SSH) access to the account, which many hosters don't want to offer to their users.
Okay.

What's about the suggestions in this case to make this part of Tc a little more flexible. Another idea is to support subfolders in SFTP-Panel (but manybe it is more complicated as handling of the ini-files)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: FTP settings, wcx_ftp.ini, include file

Post by *ghisler(Author) »

Regarding subfolders, you can now add existing SFTP connections (or other plugins) to the FTP dialog if you want:
07.10.24 Added: FTP connect dialog (Ctrl+F): File system plugins can now also be entered in the form \\\Pluginname\Path, or any directories (with drive letter or UNC path) (32/64)
Author of Total Commander
https://www.ghisler.com
kratochviljan
Junior Member
Junior Member
Posts: 3
Joined: 2024-11-20, 21:06 UTC

Re: FTP settings, wcx_ftp.ini, include file

Post by *kratochviljan »

JOUBE wrote: 2024-11-21, 11:51 UTC Is it even worth bothering with FTP/FTPS anymore? ...
...I'm sure it is. I think that there is still a large group of users who use TC because of the native integrated support of FTP/FTPS protocol. Some things are changing very slowly and in some industries this is quite ingrained.

About the possible extension itself - I think there is a good parallel with the use of the lmhosts table and its #include mechanism, if anyone remembers....

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nbte/b8d60239-dbce-47f8-a76b-da011dfec068
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: FTP settings, wcx_ftp.ini, include file

Post by *JOUBE »

ghisler(Author) wrote: 2024-11-24, 07:45 UTC Regarding subfolders, you can now add existing SFTP connections (or other plugins) to the FTP dialog if you want:
07.10.24 Added: FTP connect dialog (Ctrl+F): File system plugins can now also be entered in the form \\\Pluginname\Path, or any directories (with drive letter or UNC path) (32/64)
Of course, I will not change it to that. Instead, I use "custom shows" (Ctrl+F12) or the ignore list to select or suppress connections, depending on the situation. This has worked well for a long time, although the option for subdirectories would be also nice.

*) The corresponding hotkey Ctrl+F has also been assigned to something else for a long time...
Post Reply