Variable reference
Riversoft® STCP Gemini Rename replaces the variables in external commands (ExecProgBefore, ExecProg and ExecProgError) and in control file names (CheckLockUnlockFileName and CreateLockUnlockFileName). See Rule reference.
Example, for the file /mailbox/IN/NOTES.TXT copied as /mailbox/OUT/NOTES.TXT:
/usr/local/bin/notify.sh $FILENEWNAME $SRCUSERruns as:
/usr/local/bin/notify.sh /mailbox/OUT/NOTES.TXT PARTNERFile
| Variable | Value | Example |
|---|---|---|
$FILEOLDNAME | Full path of the original file. | /mailbox/IN/NOTES.TXT |
$FILENEWNAME | Full path of the new file. | /mailbox/OUT/NOTES.TXT |
$PATHOLDNAME | Directory of the original file. | /mailbox/IN |
$PATHNEWNAME | Directory of the new file. | /mailbox/OUT |
$OLDNAME | Original file name. | NOTES.TXT |
$NEWNAME | New file name. | NOTES.TXT |
$OLD2NAME | Original name without the extension. | NOTES |
$NEW2NAME | New name without the extension. | NOTES |
$OLD2EXT | Extension of the original name, with the dot. | .TXT |
$NEW2EXT | Extension of the new name, with the dot. | .TXT |
$PATH2OLDNAME | Original file name. | NOTES.TXT |
$PATH2NEWNAME | New file name. | NOTES.TXT |
$FILESIZE | File size, in bytes. | 10240 |
$FILETIMEMOD | Date and time of the last file modification, in the YYYYMMDDhhmmss0mmm format. | 202611101530450123 |
$FILETIMECREATE, $FILETIMEACCESS | Same value as $FILETIMEMOD. | |
$TIMESTAMP | Date and time used in the new name, according to InsertTimestampPart and InsertTimestampFormat. | 202611101530450123 |
Rule and run
| Variable | Value |
|---|---|
$RULENAME | Name of the applied rule. |
$DESCR | Description of the applied rule. |
$SRCUSER | Rule source user (SourceUser). With no rule, the -src value. |
$DSTUSER | Rule destination user (DestinationUser). With no rule, the -dst value. |
$FILEKEY | -filekey value. |
$VAR0 to $VAR9 | Values of -var0 to -var9. |
$NONE | Kept for compatibility. Not replaced. |
$ERROR | Kept for compatibility. Not replaced in this version. |
A variable with no available value remains in the text unreplaced.