Skip to content

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 $SRCUSER

runs as:

/usr/local/bin/notify.sh /mailbox/OUT/NOTES.TXT PARTNER

File

VariableValueExample
$FILEOLDNAMEFull path of the original file./mailbox/IN/NOTES.TXT
$FILENEWNAMEFull path of the new file./mailbox/OUT/NOTES.TXT
$PATHOLDNAMEDirectory of the original file./mailbox/IN
$PATHNEWNAMEDirectory of the new file./mailbox/OUT
$OLDNAMEOriginal file name.NOTES.TXT
$NEWNAMENew file name.NOTES.TXT
$OLD2NAMEOriginal name without the extension.NOTES
$NEW2NAMENew name without the extension.NOTES
$OLD2EXTExtension of the original name, with the dot..TXT
$NEW2EXTExtension of the new name, with the dot..TXT
$PATH2OLDNAMEOriginal file name.NOTES.TXT
$PATH2NEWNAMENew file name.NOTES.TXT
$FILESIZEFile size, in bytes.10240
$FILETIMEMODDate and time of the last file modification, in the YYYYMMDDhhmmss0mmm format.202611101530450123
$FILETIMECREATE, $FILETIMEACCESSSame value as $FILETIMEMOD.
$TIMESTAMPDate and time used in the new name, according to InsertTimestampPart and InsertTimestampFormat.202611101530450123

Rule and run

VariableValue
$RULENAMEName of the applied rule.
$DESCRDescription of the applied rule.
$SRCUSERRule source user (SourceUser). With no rule, the -src value.
$DSTUSERRule destination user (DestinationUser). With no rule, the -dst value.
$FILEKEY-filekey value.
$VAR0 to $VAR9Values of -var0 to -var9.
$NONEKept for compatibility. Not replaced.
$ERRORKept for compatibility. Not replaced in this version.

A variable with no available value remains in the text unreplaced.