Page 1 of 1

plugin's configuration files location

Posted: 2020-02-16, 11:21 UTC
by artt
Hi,

All these years i have read in forum about Multiple Accounts, allow multiple ini files, ini file locations, separate folder for all user settings, and so many other posts asking a way to manually set the settings files paths.
I know about RedirectSection and UseIniInProgramDir and AlternateUserIni but the problem has not been solved yet.

I would like to suggest the following about the plugin's configuration files location:

Currently, all plugin's configuration files are saved in folder where wincmd.ini exists:
(CatalogMaker.ini, fsplugin.ini, lsplugin.ini, pkplugin.ini, sftpplug.ini, tccloud.ini, tcwebdav.ini, Total7zip.xml, usercmd.ini, ...)

I would like to be able to defined (by cml switch or by wincmd.ini key) an alternate folder for any of these files to be loaded/saved.
In fact, i want to save configuration files with sensitive data (like sftpplug.ini, tccloud.ini, tcwebdav.ini, wcx_ftp.ini) in a separate folder (even in my usb flash drive).



1st approach (recommended)
A new command line switch like "/U=":

Code: Select all

/U=UserDirectory	Use an alternate folder than the default (folder where wincmd.ini exist)
			that a user can save setting's files like fsplugin.ini, lsplugin.ini, pkplugin.ini, ....
			If "/U=" is defined, each configuration file will be first searched in "UserDirectory" folder
			and IF NOT FOUND then the default folder will be used.
			The location of wincmd.ini and wcx_ftp.ini are not affected by this switch.
Example:
If exist in Default folder __ : sftpplug.ini, tccloud.ini, tcwebdav.ini, CatalogMaker.ini, fsplugin.ini, lsplugin.ini, pkplugin.ini, Total7zip.xml
and exist in "UserDirectory": sftpplug.ini, tccloud.ini, tcwebdav.ini
then, TC will load (sftpplug.ini, tccloud.ini, tcwebdav.ini) from the "UserDirectory" and the remaining files from the Default folder.


2nd approach
A new section in wincmd.ini where all settings files (except wincmd.ini and wcx_ftp.ini) can be redirected (variables will be supported).

Example:
The files (sftpplug.ini, tccloud.ini, tcwebdav.ini) will be loaded from the defined location, all the other from the default folder.
[File_Locations]
fsplugin.ini=
lsplugin.ini=
pkplugin.ini=
sftpplug.ini=%PRIVE_USB%\#PRIVE\TotalCommander\CONFIG\sftpplug.ini
tccloud.ini=%COMMANDER_PATH%\..\..\PRIVE\tccloud.ini
tcwebdav.ini=%COMMANDER_PATH%\..\..\PRIVE\tcwebdav.ini
Total7zip.xml=
usercmd.ini=

Best Regards
artt

Re: plugin's configuration files location

Posted: 2021-03-02, 06:43 UTC
by Stiltzkin
any news / solutions / plans for this? seems like a useful suggestion.
especially for relocating wcx_ftp.ini and usercmd.ini

Re: plugin's configuration files location

Posted: 2021-03-14, 18:52 UTC
by Stiltzkin
so now with the progress in totalcmd is there hope for wcx_ftp.ini and usercmd.ini too?

Re: plugin's configuration files location

Posted: 2021-03-15, 18:35 UTC
by ghisler(Author)
wcx_ftp.ini can already be set via
- registry
- paremeter /f=
- useiniinprogramdir

Re: plugin's configuration files location

Posted: 2021-03-15, 19:50 UTC
by Stiltzkin
i'm already using

Code: Select all

[Configuration]
UseIniInProgramDir=7
RedirectSection=%COMMANDER_PATH%\Data\Profile\Settings\configuration.ini

[Buttonbar]
RedirectSection=%COMMANDER_PATH%\Data\Profile-%computername%\Settings\buttonbar.ini

[PackerPlugins]
RedirectSection=%COMMANDER_PATH%\Data\Profile\Settings\plugins.ini
the ability to use RedirectSection in the wcx_ftp.ini would be handy too. because right now everything (ftp settings / ftp sites and even download history ([OldConnections]) goes into 1 file)

Re: plugin's configuration files location

Posted: 2021-04-15, 20:41 UTC
by fenix_productions
Digging up…

Is there any hope for [File_Locations] section this year?

Re: plugin's configuration files location

Posted: 2021-04-16, 11:23 UTC
by ghisler(Author)
There is a new section [ReplaceIniLocation] in Total Commander 10 which partially does this: It tells Total Commander what it should send to plugins as the suggested ini file location and/or name. However, the plugins have to use that. Most will ignore the name and only use the path, or even ignore both.

Re: plugin's configuration files location

Posted: 2021-04-16, 12:53 UTC
by fenix_productions
2ghisler(Author)
Thank you for information. I've missed that.

Now time for tests :)