Variable Replacements

Top  Previous  Next

When specifying action scripts you can refer to variables that have been set in scripts, or in the options, or automatically during processing.

 

Some variables that are automatically updated by the program during processing:

 

•filepath
Complete path to the file being processed, including filename with extension.
 
•fileext
Just the file extension, with no leading period (dot).
 
•filedir
Just the directory where the file is, without the trailing \.
 
•filename
Just the base filename, without the directory or any extension.
 
•filenamewe
The base filename, with the extension.
 
•appdir
The application directory where this program has been run from.
 
•tooldir
The directory reserved for custom user tools (typically %appdir%\Tools).
 

 

You can also replace a system environmental variable with:

•%env:ENV_VARNAME%
Where ENV_VARNAME is the name of a system environmental variable.

 

You can also replace a csidl system path with:

•%csidl:CSIDLSTRING%
Where CSIDLSTRING is the name of a csidl folder (SYSTEM, etc.).
•%csidlnum:CSIDLCONSTANTNUMBER%
Where CSIDLCONSTANTNUMBER is the numeric constant (decimal) a csidl folder (37 corresponds to SYSTEM, etc.).

 

In addition, you can insert date/time information with the following syntax:

 

•%filedate:FORMAT%
Formatted date/time information for the file being processed.
 
•%date:FORMAT%
The current date/time format.

 

Where the FORMAT part is some text including:

 $a   Abbreviated weekday name

 $A   Full weekday name

 $b   Abbreviated month name

 $B   Full month name

 $c   Date and time representation appropriate for locale

 $d   Day of month as decimal number (01 - 31)

 $H   Hour in 24-hour format (00 - 23)

 $I   Hour in 12-hour format (01 - 12)

 $j   Day of year as decimal number (001 - 366)

 $m   Month as decimal number (01 - 12)

 $M   Minute as decimal number (00 - 59)

 $p   Current locale's A.M./P.M. indicator for 12-hour clock

 $S   Second as decimal number (00 - 59)

 $U   Week of year as decimal number, with Sunday as first day of week (00 - 53)

 $w   Weekday as decimal number (0 - 6; Sunday is 0)

 $W   Week of year as decimal number, with Monday as first day of week (00 - 53)

 $x   Date representation for current locale

 $X   Time representation for current locale

 $y   Year without century, as decimal number (00 - 99)

 $Y   Year with century, as decimal number

 $z   Time-zone name or abbreviation

 $Z   Time-zone name or abbreviation

 

For example:

%date:$A, $B $d at $i:$M$p% would display as: Tuesday, October 26 at 9:39pm