Knowledge Base

Home > Features > Conditions

Created
Modified

Print Article

Article 2678

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:
 
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"

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"

Exclusion

  • Transfer all files in the folder and its subfolders expect the files with extension .bak or .nfo
    NOT (System.FileExtension:=".bak" OR System.FileExtension:=".nfo")
  • Transfer all files in the folder 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

  1. AQS Syntax

Keywords
aqs

Related Articles


Please choose 1 to 5 whether this article solves your problem.

1 No Help at all

5 Problem Solved

Saving...
Thank you for your feedback.

What do you think about this topic? Send feedback!