Discuss this help topic in SecureBlackbox Forum
File masks in group operations
Since SecureBlackbox version 13 certain SFTP and FTPS operations support expressions during group operations on files.
Expressions are passed in a Mask (RemoteMask) parameter of UploadFiles, DownloadFiles, ListDirectory and RemoveFiles methods of TElSimpleSFTPClient and TElSimpleFTPSClient components.
An expression should start with 'expr:' followed by the condition. A condition can include arithmetics operators (+, -, *, / or div), logical operators (only 'or', 'xor', 'not' are supported), comparison operators (=, <, >), function calls and variables.
Text constants must be quoted with double quotes.
Supported functions are
- StringContains(What, Where) - returns true if What is contained in Where.
- StringIndexOf(What, Where) - zero-based index of What in Where or -1 if What is not found in Where.
- DateBefore(Date1, Date2) - returns true if Date1 precedes Date2.
- DateAfter(Date1, Date2) - returns true if Date1 follows Date2.
Parameters in date functions may be represented as quoted text containing the date in the RFC822 format, the UTCTime format or the GeneralizedTime format.
The variables are
- CurrentTime - Current time in UTC.
- FileName - the name of the file.
- FileSize - file size in bytes.
- FileCTime - file creation time.
- FileMTime - file modification time.
Note that in FTP/FTPS the creation and the modification times are the same.
Remote file times are specified in the time zone of the server.
Local file times (in UploadFiles operation) are specified in UTC.
Instead, in SFTP the creation and the modification times can be different.
Remote file times are expressed in UTC as per SFTP standard.
Local file times (in UploadFiles operation) are specified in UTC.
How To articles about client-side FTPS questions
How To articles about SFTP client
Discuss this help topic in SecureBlackbox Forum