Directory Scanner – Trigger Configuration (Magic xpi 4.6)
In Trigger mode, you can use the Directory Scanner component to scan multiple directories.
Note:
|
-
Magic xpi does not currently support Unicode file names. This means that Magic xpi does not support file names in a language that is different than the language of your machine or if the file name has a combination of languages.
-
If you are going to use an FTP source in the trigger, then you should also define an FTP service in the Settings dialog box's Services section.
|
The Component Configuration: Directory Scanner dialog box contains the following fields:
|
|
Source
|
Select where the directory to be scanned is located:
|
Directory
|
Click to create expressions that will support only environment variables and global variables to generate source and destination directory values. The expressions are calculated before a new file is moved to the destination. Click to select the path or address of the directory or folder to be scanned. This button is available only if your source directory is located on a LAN.
|
Subdirectories
|
Select this check box if you want the component to scan all of the selected folder's subfolders.
|
Filter
|
Enter criteria to limit the files identified by the scanning operation. Click to the right of the field to enter the filter criteria in the Filter dialog box.
You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.
|
Action
|
Define the action you want the component to perform on the file(s) identified. The options are:
|
Directory
|
Click to create expressions that will support only environment variables and global variables to generate source and destination directory values. The expressions are calculated before a new file is moved to the destination. Click to select the path or address of the directory or folder to be scanned.
|
Mask
|
Enter the structure for the name of the moved file or the renamed file. You can use wildcard characters. For example:
-
If you want all files to have the file name extension, you can enter *.txt and all files will be saved in the destination directory with their original name and the .txt extension.
-
If you want all files to take only the first two letters of the original name, enter ??.* to create files with their original extension and only the first two letters of the original name.
The Mask property is available when you select Move or Rename as the Action.
Examples:
Enter in Mask: *.txt
Newly created files will be: any name.txt
OR:
Enter in Mask: ??.*
Newly created files will be:
If the original file is Address.txt, then the new file will be Ad.txt
If the original file is Address.doc, then the new file will be Ad.doc
If the original file is Name.txt, then the new file will be Na.txt
|
Polling Interval
|
Enter the time interval (in milliseconds) that the Directory Scanner will use to scan directories. For example, if you enter 1000 milliseconds, the Directory Scanner will scan the directory every second.
|
Keep Alive Interval
|
The amount of time in minutes that the trigger can be unresponsive before it is automatically restarted. The default value is 0, which means that the trigger can be permanently unresponsive.
Note:
|
You should be very careful when selecting a value for this parameter. If the chosen value is too small, a trigger may terminate before it completes a valid operation.
|
|
To configure the Directory Scanner as a trigger, follow these steps:
-
Define an FTP service in the Settings dialog box's Services section. For more information, click here.
-
In the Component Configuration: Directory Scanner dialog box, enter the relevant information.
-
Click New to add directories to scan.
-
Click the Advanced button to open the Log and Return Details dialog box, where you can enter information about log files and file destinations.
-
When you have finished, click OK to generate the trigger.