Salesforce

Directory Scanner (Magic xpi 4.9)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Directory Scanner (Magic xpi 4.9)

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:

  • Move

  • Delete

  • Rename

In addition, the component:

  • Watches for a single file in a directory or subdirectory.

  • Lets you exclude a group of files or a specific file from being watched.

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.

Mode

Description

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.

Deployment

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

Related Topics

Reference
Attachment 
Attachment