All directory names may contain macros that are expanded during synchronization. Begin and end of each macro is marked by a '%' character. Besides special macros handling time and date (see "Time-stamped directories"), the operating system's environment variables can also be used.
Example:
C:\Backup\%USERNAME%_Config expands
to
%APPDATA%\FreeFileSync expands
to
C:\Backup\ZenJu_Config
C:\Documents and
Settings\ZenJu\Application Data\FreeFileSync
Hint:
You can add a great amount of flexibility to Batch Synchronization (*.ffs_batch) by creating new temporary environment variables in a *.bat/*.cmd file that are evaluated by FreeFileSync at runtime!
Example:
The batch configuration file C:\SyncJob.ffs_batch contains macro %MyVar% instead of an absolute target directory and is invoked by a *.cmd file:
set
MyVar=C:\Target
cd "C:\Program
files\FreeFileSync"
FreeFileSync.exe C:\SyncJob.ffs_batch
(->%MyVar% is
replaced by C:\Target during
execution)
Note:
Temporary
environment variables created with the "set"
command are only valid if the batch job is started by calling the
executable directly! Using "start
/wait" or relying on Shell Execute creates a new
program context without these temporal variables.