Directory Scanner (Magic xpi 4.13)
The Directory Scanner component checks local area network (LAN) and/or FTP directories to see when new files are created. Once the first file is found, the step is completed. The component can also automatically perform specific actions on the newly created files in the directories scanned by the component. In this way the component is able to quickly respond when new files are created.
You can use the component to perform these actions:
In addition, the component:
You use the component in the two modes described below. The mode is dependent on where you drag the component. For example, if you drag the component to the Trigger area, the component is configured as a Trigger.
|
When using the Directory Scanner it creates a list of the files it needs to process. If you use it as a Trigger, this list is created once; but when using it as a Step, the list is created every time the step runs.
The process of creating this list takes time, especially if you have more than 10,000 files in the directory. Therefore, in cases like this, it is better to use the Directory Scanner as a Trigger, if possible.
|
|
|
Step
|
Once the first file satisfying the configuration criteria is found in the specified time period, or once the time period has elapsed, the appropriate action is performed.
|
Trigger
|
The component is activated by the Server and keeps watching the directory for new files as long as the activating Server is running.
| You can scan multiple directories when you use the Directory Scanner component as a trigger. |
|
At deployment, the component will scan the directories according to your configuration parameters. If you are moving a file (the FTP to LAN method and LAN to LAN method) the first file found by the component is returned through the User BLOB or selected variable to the folder or directory that you indicated in the configuration. The file name is returned through the user string or selected variable. Browse to the folder or directory where the file is returned to view the file.
If you rename a file (the FTP Rename method and the LAN Rename method) the file is renamed in the original folder or directory. If you delete a file (the FTP to Delete method and the LAN to Delete method) the file is deleted.
|
There is a sample project available for this component. You can find the sample project at: <Magic xpi installation>\Extra\SampleProjects
|
Directory Scanner – Configuration
Directory Scanner – Error Codes
Directory Scanner Troubleshooting
How Do I Make Sure That the Project’s Directory Scanner Component Can Access Files from a Network Drive?