% Placeholders in File Names
File names can contain one or more of the following case-sensitive substitution strings, which are expanded at run time.
%a - abbreviated weekday name (for example, "Wed") %A - full weekday name (for example, "Wednesday" %b - abbreviated month name (for example, "Mar") %B - full month name (for example, "March") %d - replace with the 2 digit current day %D - replace with the current data file name (no path or extension) (as of 3.0.005.05) %F or %f - replace with the current form name (no path or extension) %H - replace with the 2 digit current hour (local time, 24 hour clock) %I - replace with the 2 digit current hour (local time, 12 hour clock) %i - in a Folder Monitor context, replace with the Folder Monitor instance name %j - replace with the 3 digit day-of-year (001-366) %m - replace with the 2 digit current month %M - replace with the 2 digit current minute %p - current locale's AM/PM indicator for 12 hour clock %P - replace with the current process id (as of 3.0.003.20) %S - replace with the 2 digit current second %t - the full path of the temporary output file produced when using the run:: syntax (Merge-only) (as of 3.0.004.05) %T - replace with the path of the DocOrigin temp folder (as of 3.0.003.20) %u - replace with a short, file safe, unique string (as of 3.0.003.20) %U - Week of year (2 digit 00-53, starting on Sunday) %v - last output file path+name+ext (Merge-only) (as of 3.1.002.07) %w - Weekday as number (0-6), starting on Sunday %W - Week of year (2 digit 00-53, starting on Monday) %x - last output name+ext (Merge-only) (as of 3.1.002.07) %y - replace with the 2 digit current year %Y - replace with the 4 digit current year %z - last output file name only (Merge-only) (as of 3.1.002.07) %% - replace with %
For example the command line setting:
-logfile $L%d_%m_%Y_logfile.txt
Would generate a logfile named:
C:\DocOrigin\User\Logs\15_03_2012_logfile.txt
assuming March 15, 2012 were the current date.
The above % placeholders may be used in command line options. However, if a file name template string with embedded % placeholders were passed as an argument to a script function, you would not get your desired result. Script functions do not automatically expand the % placeholders listed above. The user is expected to exert control over their file names by using _file.resolveName or _resolve – which do handle the % placeholder substitutions. The user would pass the resolved file name to the script function.
Script functions do automatically resolve $X folder mappings if they are used in an argument that is for a file or directory name.
Folder Monitor Instance Name Substitution
In the Folder Monitor context the special placeholder, %i can be used to include the monitor instance name in file name specifications.
If you are not using "Multiple Monitors", but just the "Default Monitor", then the sequence _%i will be replaced with nothing (discarded).
E.g.
-logFileFormat $L/FM_%i_%U.log -queue1 $U/FolderMonitor/%i/Jobs
For a monitor instance named AdHoc with DocOrigin installed in the usual location, those would become, in week 23:
-logFileFormat C:/DocOrigin/User/Logs/FM_AdHoc_23.log -queue1 C:/DocOrigin/User/FolderMonitor/AdHoc/Jobs
For the Default monitor, it would be:
-logFileFormat C:/DocOrigin/User/Logs/FM_23.log -queue1 C:/DocOrigin/User/FolderMonitor//Jobs