Allow user to create custom variable for paths

Discuss new features and functions
Posts: 19
Joined: 26 Mar 2021

untroll

It should be great to add a way to create custom variables for paths within the global configuration of FreeFileSync. I think theses variables should be saved in the "GlobalSettings.xml" file.

With this variables, we should be able to change the backup location just by editing the variable value. For example, let say we have a variable named "%BACKUP_DEST_HOST_IP%" with the value of "\\192.168.10.24". We could you use the variable in the destination path : "%BACKUP_DEST_HOST_IP%\Backup\" which would be interpreted as "\\192.168.10.24\Backup\".

When we have multiple paths to copy to the same network destination path it can take many minutes to change the destination paths when this location changes. This could be solved with my suggestion.

Thank you
User avatar
Posts: 2283
Joined: 22 Aug 2012

Plerry

Not sure if Macros also work when used in GlobalSettings.xml; just try.
If not, you can always revert to defining your location(s) in a Command line, e.g. from a *.bat or *.cmd file.
Posts: 19
Joined: 26 Mar 2021

untroll

I understand that there are workarounds like that but it should be easier to be done...
User avatar
Posts: 2283
Joined: 22 Aug 2012

Plerry

As I wrote, I am not sure if Macros work in GlobalSettings.xml.
But, that does not seem necessary because, in line with the example in the Macros manual page, Macros (incl. self defined variables) do/should work in FFS sync configurations (*.ffs_batch and likely also *.ffs_gui).
That does not sound like a workaround, but rather like exactly what you requested.
Posts: 19
Joined: 26 Mar 2021

untroll

Plerry, you are wrong. The manual page you refer to needs a .cmd file to set the custom environment variable before running the .ffs_batch file. I would like this feature built-in without the need of a .cmd file.