知識庫
建立日期
修改日期
修改日期
Conditions
Introduction
Canonical Advanced Query Syntax (AQS) [1] can be used to build the conditions query. The same query syntax is used by Windows Search.
When a condition is evaluated the result will be either true or false.
Properties
Name | Description | Data type |
System.FileName | File name | String |
System.ItemName | Item name For file items (includes file folders) the same as System.FileName |
String |
System.ItemType | For a file item the value is the same as System.FileExtension. For a file folder the value is "Directory" |
String |
System.Size | Size Empty for file folders |
Integer |
System.DateModified | Last modified date | DateTime |
System.DateCreated | Creation date Not always available |
DateTime |
System.FileExtension | File extension Empty for file folders |
String |
System.ItemPathDisplay | The display path to the item. | String |
System.ItemFolderPathDisplay | The display path of an item's parent folder. | String |
SmartSoft.Unix.FileType | Unix file type Only available for FTP and SFTP remote items. Prefer System.ItemType instead. |
Enum: RegularFile Directory SymbolicLink Special Unknown Socket CharacterDevice BlockDevice FIFO |
Extensions
Regular Expression
To use regular expression for comparison, prefix any string literal with <RegEx>. Regular expressions are supported for equal and not equal operations.
Syntax:
Syntax:
Equals:
Property:="<RegEx>pattern"
e.g. System.FileName:="<RegEx>rdb[0-9][0-9]\.dat"
Not equal:
Property:<>"<RegEx>pattern"
e.g. System.FileName:<>"<RegEx>rdb[0-9][0-9]\.dat"
e.g. System.FileName:<>"<RegEx>rdb[0-9][0-9]\.dat"
Examples
Inclusion
- Transfer all files with the file name matching the DOS wildcard "data*.dat" in the folder
System.FileName:~"data*.dat" - Transfer all files with the file name matching the regular expression "rdb[0-9][0-9]\.dat" in the folder
System.FileName:="<RegEx>rdb[0-9][0-9]\.dat" - Transfer all files with file extension .pdf in the folder
System.FileExtension:=".pdf" - Transfer all files with file extension .pdf in the folder and its subfolders
System.FileExtension:=".pdf" OR System.ItemType:="Directory" - Transfer all files that have been modified yesterday in in the folder and its subfolders
System.DateModified:=System.StructuredQueryType.DateTime#Yesterday OR System.ItemType:="Directory" - Transfer all files that have been modified in the year 2017 in in the folder and its subfolders
(System.DateModified:>2017-01-01 00:00 AND System.DateModified:<2018-01-01 00:00) OR System.ItemType:="Directory" - Transfer all files and folders where the Archive attribute is set
System.FileAttributes:~="A"
Exclusion
- Exclude all .bak files
System.ItemType:="Directory" OR NOT (System.FileExtension:=".bak") - Exclude all files with the .bak or .nfo extension
System.ItemType:="Directory" OR NOT (System.FileExtension:=".bak" OR System.FileExtension:=".nfo") - Exclude all folders with the name _vti_cnf
NOT (System.ItemType:="Directory" AND System.FileName:="_vti_cnf") - Exclude all folders with the name _vti_cnf or the name .git
NOT (System.ItemType:="Directory" AND (System.FileName:="_vti_cnf" OR System.FileName:=".git")) - Transfer all files (no folders) in the folder (no subfolders) expect the files where the file name matches the DOS wildcard "foo*.bak"
System.ItemType:<>"Directory" AND (NOT (System.FileName:~"foo*.bak"))
Mixed
- Transfer all files in the folder and its subfolders where the file name contains "kepler" and the file size is greater than 1KB but the file extension is not .bak
((System.FileName~="kepler" AND System.Size:>1kb) AND NOT (System.FileExtension:=".bak")) OR System.ItemType:="Directory"
References
What do you think about this topic? Send feedback!