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, the operating system's environment variables can also be used.
Internal macros:
%time% -
current time, format [hhmmss], e. g. "201340"
%weekday% -
day of the week, e. g. "Monday"
%date% -
current date, e. g. "2010-07-13"
%week% -
calendar week, e. g. "28"
%month% -
current month, e. g. "July"
%year% -
current year, e. g. "2010"
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:
C:\Backup\%username%_Config expands
to
%appdata%\FreeFileSync expands
to
C:\Backup\ZenJu_Config
C:\Documents and
Settings\ZenJu\Application Data\FreeFileSync
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.