Hallo,
I miss support for Environment variables to get expanded as logfile definition.
Definition of logfile I tried was: <LogFolder>%FFS_LogDir%\%timestamp%-Sync-%COMPUTERNAME%</LogFolder>
Result is that internal macros were expanded but environment variables not.
Could you please add support for environment variables due to better customization in local networks?
Thanks for amazing freefilesync-tool and best regards
Syncchroton
Logfile-Support for Environment variables
- Posts: 4
- Joined: 21 Dec 2019
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
I'm not sure what it is that is not working in your case. Using "%COMPUTERNAME%" for the log folder paths works in my tests.
- Posts: 4
- Joined: 21 Dec 2019
FFS-Macros working fine but Environment variable %FFS_LogDir% defined in outside shell is not expanded correct as it is on DirPairs.
- Site Admin
- Posts: 7211
- Joined: 9 Dec 2007
%COMPUTERNAME% *is* an environment variable. Expanding user-defined environment variables also works in my test.
Environment variables are inherited from the parent process. My guess is the problem is in the way you start FreeFileSync. For example consider the following note in the FFS manual:
Environment variables are inherited from the parent process. My guess is the problem is in the way you start FreeFileSync. For example consider the following note in the FFS manual:
https://freefilesync.org/manual.php?topic=macrosTemporary environment variables created with the set command are only valid if the synchronization is started by calling the FreeFileSync executable directly. Using start /wait would create a new program context without these temporary variables
- Posts: 4
- Joined: 21 Dec 2019
You are right process context was the problem - it was my fault. Everything works fine now after applying settings in user profile permanently.