Salesforce

Directory Scanner - Methods (Magic xpi 4.7)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Directory Scanner – Methods

The following methods are used to configure the Directory Scanner component:

When working with FTP methods, you should first define an FTP resource in the Settings dialog box's Resources section.

The following table lists the methods and parameters that can be used. Parameters in bold are mandatory.

Method

Parameters

Description

Delete File from FTP scans an FTP server and deletes indicated files.

Source Directory Location

Enter the location of the FTP directory to scan.

Include Subdirectories

Select one of the following from the drop-down list to indicate whether Directory Scanner will scan the subdirectories of the selected directory:

  • No

  • Yes

Filter

Enter the names of files or groups of files that should be watched. You can use wildcard characters when entering this criteria. For example, if you want to watch only files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Exclude

Enter the names of files or groups of files that should not be scanned. You can use wildcard characters when entering this criteria. For example, if you want to exclude all files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Timeout

Define the time (in seconds) during which the flow component should perform the scan (only available in Step mode). If no file is created before the timeout period ends, the flow will move to the next step.

A timeout of 0 indicates that the Directory Scanner will not wait for any amount

of time (no timeout). In other words, if a file is not created immediately, the flow

moves to the next step without waiting. A timeout with a negative number indicates

that the Directory Scanner will wait indefinitely until a file is created.

Order

Select one of the following from the drop-down list to indicate the order in which the directories are scanned:

  • Ascending

  • Descending

Criteria

Select one of the following from the drop-down list to indicate the scanning criteria:

  • Name

  • Size

  • TimeStamp

Order Operator

Select one of the following from the drop-down list to indicate the order of the scanned files if the Criteria parameter (above) is Size or TimeStamp:

  • Greater than

  • Less than

  • Equal to

File Size

Enter the file size (in bytes) if the Criteria parameter is Size.

File Date

Enter the file date (DD/MM/YYYY) if the Criteria parameter is TimeStamp.

File Time

Enter the file time (HH:MM:SS) if the Criteria parameter is TimeStamp.

When working with an FTP server, seconds are not considered in the time criteria

for the time stamp.

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.

The default is 3000 milliseconds.

Log Type

Determines the format of the generated log file. Select one of the following from the drop-down list:

  • Text (default)

  • CSV

  • XML

Log File Name

Enter the name of the log file if one is returned.

Return File To

Click to open the Variables List. Select where the file being scanned for is returned. The file can be returned to a variable defined by the user or to a User BLOB.

Return Filename To

Click to open the Variables List. Select where the filename is returned if you are moving or renaming a file. The file can be returned to a variable defined by the user or to a User String.

Error Code

A Directory Scanner error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Delete File from LAN scans a local directory and deletes the indicated files.

Source Directory Location

Enter the location of the local directory to scan.

Include Subdirectories

Select one of the following from the drop-down list to indicate whether the Directory Scanner will scan the subdirectories of the selected directory:

  • No

  • Yes

Filter

Enter the names of files or groups of files that be watched. You can use wildcard characters when entering this criteria. For example, if you want to watch only files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Exclude

Enter the names of files or groups of files that should not be scanned. You can use wildcard characters when entering this criteria. For example, if you want to exclude all files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Timeout

Define the time (in seconds) during which the flow component should perform the scan (only available in Step mode). If no file is created before the timeout period ends, the will move to the next step.

A timeout of 0 indicates that the Directory Scanner will not wait for any amount

of time (no timeout). In other words, if a file is not created immediately, the flow

moves to the next step without waiting. A timeout with a negative number indicates

that the Directory Scanner will wait indefinitely until a file is created.

Order

Select one of the following from the drop-down list to indicate the order in which the directories are scanned:

  • Ascending

  • Descending

Criteria

Select one of the following from the drop-down list to indicate the scanning criteria:

  • Name

  • Size

  • TimeStamp

Order Operator

Select one of the following from the drop-down list to indicate the order of the scanned files if the Criteria parameter (above) is Size or TimeStamp:

  • Greater than

  • Less than

  • Equal to

File Size

Enter the file size (in bytes) if the Criteria parameter is Size.

File Date

Enter the file date (DD/MM/YYYY) if the Criteria parameter is TimeStamp.

File Time

Enter the file time (HH:MM:SS) if the Criteria parameter is TimeStamp.

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.

The default is 3000 milliseconds.

Log Type

Determines the format of the generated log file. Select one of the following from the drop-down list:

  • Text (default)

  • CSV

  • XML

Log File Name

Enter the name of the log file if one is returned.

Return File To

Click to open the Variables List. Select a variable where the file being scanned for is returned. The file can be returned to a variable defined by the user or to a User BLOB.

Return Filename To

Click to open the Variables List. Select a variable where the filename is returned if you are moving or renaming a file. The file can be returned to a variable defined by the user or to a User String.

Error Code

A Directory Scanner error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

FTP to LAN scans directories on an FTP server and moves indicated files to a LAN.

Source Directory Location

Enter the location of the FTP directory to scan.

Include Subdirectories

Select one of the following from the drop-down list to indicate whether Directory Scanner will scan the subdirectories of the selected directory:

  • No

  • Yes

Filter

Enter the names of files or groups of files that be watched. You can use wildcard characters when entering this criteria. For example, if you want to watch only files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

FTP Transfer Mode

This property lets you determine in which format your files are transferred. The choices are:

  • Binary

  • ASCII

Exclude

Enter the names of files or groups of files that should not be scanned. You can use wildcard characters when entering this criteria. For example, if you want to exclude all files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Timeout

Define the time (in seconds) during which the flow component should perform the scan (only available in Step mode). If no file is created before the timeout period ends, the flow will move to the next step.

A timeout of 0 indicates that the Directory Scanner will not wait for any amount

of time (no timeout). In other words, if a file is not created immediately, the flow

moves to the next step without waiting. A timeout with a negative number indicates

that the Directory Scanner will wait indefinitely until a file is created.

Destination Directory Location

Enter the location of the local directory to where the files are moved.

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 same suffix, you can enter *.txt and all files will be saved in the destination directory with their original name and the .txt suffix.

  • If you want all files to take only the first two letters of the original name, enter ??.* to create files with their original suffix and only the first two letters of the original name.

Order

Select one of the following from the drop-down list to indicate the order in which the directories are scanned:

  • Ascending

  • Descending

Criteria

Select one of the following from the drop-down list to indicate the scanning criteria:

  • Name

  • Size

  • TimeStamp

Order Operator

Select one of the following from the drop-down list to indicate the order of the scanned files if the Criteria parameter (above) is Size or TimeStamp:

  • Greater than

  • Less than

  • Equal to

File Size

Enter the file size (in bytes) if the Criteria parameter is Size.

File Date

Enter the file date (DD/MM/YYYY) if the Criteria parameter is TimeStamp.

File Time

Enter the file time (HH:MM:SS) if the Criteria parameter is TimeStamp.

When working with an FTP server, seconds are not considered in the time criteria

for the time stamp.

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.

The default is 3000 milliseconds.

Log Type

Determines the format of the generated log file. Select one of the following from the drop-down list:

  • Text (default)

  • CSV

  • XML

Log File Name

Enter the name of the log file if one is returned.

Return File To

Click to open the Variables List. Select a variable where the file being scanned for is returned. The file can be returned to a variable defined by the user or to a User BLOB.

Return Destination Filename To

Click to open the Variables List. Select a variable where the filename is returned if you are moving or renaming a file. The file can be returned to a variable defined by the user or to a User String.

Return Source Filename To

Click to open the Variables List. Select a variable that returns the name of the original file that was copied or moved.

Error Code

A Directory Scanner error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

LAN to LAN scans a local directory and moves indicated files to another directory on the local server.

Source Directory Location

Enter the location of the local directory to scan.

Include Subdirectories

Select one of the following from the drop-down list to indicate whether the Directory Scanner will scan the subdirectories of the selected directory:

  • No

  • Yes

Filter

Enter the names of files or groups of files to be watched. You can use wildcard characters when entering this criteria.

For example, if you want to watch only files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Exclude

Enter the names of files or groups of files that should not be scanned. You can use wildcard characters when entering this criteria. For example, if you want to exclude all files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Timeout

Define the time (in seconds) during which the flow component should perform the scan (only available in Step mode). If no file is created before the timeout period ends, the flow will move to the next step.

A timeout of 0 indicates that the Directory Scanner will not wait for any amount

of time (no timeout). In other words, if a file is not created immediately, the flow

moves to the next step without waiting. A timeout with a negative number indicates

that the Directory Scanner will wait indefinitely until a file is created.

Destination Directory Location

Enter the location of the directory where the files are moved to.

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 same suffix, you can enter *.txt and all files will be saved in the destination directory with their original name and the .txt suffix.

  • If you want all files to take only the first two letter of the original name, enter ??.* to create files with their original suffix and only the first two letters of the original name.

Order

Select one of the following from the drop-down list to indicate the order that the directories are scanned:

  • Ascending

  • Descending

Criteria

Select one of the following from the drop-down list to indicate the scanning criteria:

  • Name

  • Size

  • TimeStamp

Order Operator

Select one of the following from the drop-down list to indicate the order of the scanned files if the Criteria parameter (above) is Size or TimeStamp:

  • Greater than

  • Less than

  • Equal to

File Size

Enter the file size (in bytes) if the Criteria parameter is Size.

File Date

Enter the file date (DD/MM/YYYY) if the Criteria parameter is TimeStamp.

File Time

Enter the file time (HH:MM:SS) if the Criteria parameter is TimeStamp.

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.

The default is 3000 milliseconds.

Log Type

Determines the format of the generated log file. Select one of the following from the drop-down list:

  • Text (default)

  • CSV

  • XML

Log File Name

Enter the name of the log file if one is returned.

Return File To

Click to open the Variables List. Select a variable where the file being scanned for is returned. The file can be returned to a variable defined by the user or to a User BLOB.

Return Destination Filename To

Click to open the Variables List. Select a variable where the filename is returned if you are moving or renaming a file. The file can be returned to a variable defined by the user or to a User String.

Return Source Filename To

Click to open the Variables List. Select a variable that returns the name of the original file that was copied or moved.

Error Code

A Directory Scanner error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Rename File in FTP scans the FTP server and renames selected files.

Source Directory Location

Enter the location of the FTP directory to scan.

Include Subdirectories

Select one of the following from the drop-down list to indicate whether Directory Scanner will scan the subdirectories of the selected directory:

  • No

  • Yes

Filter

Enter the names of files or groups of files that be watched. You can use wildcard characters when entering this criteria. For example, if you want to watch only files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

FTP Transfer Mode

This property lets you determine in which format your files are transferred. The choices are:

  • Binary

  • ASCII

Exclude

Enter the names of files or groups of files that should not be scanned. You can use wildcard characters when entering this criteria. For example, if you want to exclude all files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Timeout

Define the time (in seconds) during which the flow component should perform the scan (only available in Step mode). If no file is created before the timeout period ends, the flow will move to the next step.

A timeout of 0 indicates that the Directory Scanner will not wait for any amount

of time (no timeout). In other words, if a file is not created immediately, the flow

moves to the next step without waiting. A timeout with a negative number indicates

that the Directory Scanner will wait indefinitely until a file is created.

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 same suffix, you can enter *.txt and all files will be saved in the destination directory with their original name and the .txt suffix.

  • If you want all files to take only the first two letters of the original name, enter ??.* to create files with their original suffix and only the first two letters of the original name.

Order

Select one of the following from the drop-down list to indicate the order in which the directories are scanned:

  • Ascending

  • Descending

Criteria

Select one of the following from the drop-down list to indicate the scanning criteria:

  • Name

  • Size

  • TimeStamp

Order Operator

Select one of the following from the drop-down list to indicate the order of the scanned files if the Criteria parameter (above) is Size or TimeStamp:

  • Greater than

  • Less than

  • Equal to

File Size

Enter the file size (in bytes) if the Criteria parameter is Size.

File Date

Enter the file date (DD/MM/YYYY) if the Criteria parameter is TimeStamp.

File Time

Enter the file time (HH:MM:SS) if the Criteria parameter is TimeStamp.

When working with an FTP server, seconds are not considered in the time criteria

for the time stamp.

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.

The default is 3000 milliseconds.

Log Type

Determines the format of the generated log file. Select one of the following from the drop-down list:

  • Text (default)

  • CSV

  • XML

Log File Name

Enter the name of the log file if one is returned.

Return File To

Click to open the Variables List. Select a variable where the file being scanned for is returned. The file can be returned to a variable defined by the user or to a User BLOB.

Return Destination Filename To

Click to open the Variables List and select where the filename is returned if you are moving or renaming a file. The file can be returned to a variable defined by the user or a User String.

Return Source Filename To

Click to open the Variables List. Select a variable that returns the name of the original file that was copied or moved.

Error Code

A Directory Scanner error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Rename File in LAN renames indicated files on a local directory.

Source Directory Location

Enter the location of the local directory to scan

Include Subdirectories

Select one of the following from the drop-down list to indicate whether the Directory Scanner will scan the subdirectories of the selected directory:

  • No

  • Yes

Filter

Enter the names of files or groups of files to be watched. You can use wildcard characters when entering this criteria. For example, if you want to watch only files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Exclude

Enter the names of files or groups of files that should not be scanned. You can use wildcard characters when entering this criteria. For example, if you want to exclude all files that start with Customer, enter Customer * to indicate all files with the word customer and any other name after. The * wildcard character can be in any position.

You can enter more than one file, separating them with a comma. For example, *.txt,*.doc.

Timeout

Define the time (in seconds) during which the flow component should perform the scan (only available in Step mode). If no file is created before the timeout period ends, the will move to the next step.

A timeout of 0 indicates that the Directory Scanner will not wait for any amount

of time (no timeout). In other words, if a file is not created immediately, the flow

moves to the next step without waiting. A timeout with a negative number indicates

that the Directory Scanner will wait indefinitely until a file is created.

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 same suffix, you can enter *.txt and all files will be saved in the destination directory with their original name and the .txt suffix.

  • If you want all files to take only the first two letter of the original name, enter ??.* to create files with their original suffix and only the first two letters of the original name.

Order

Select one of the following from the drop-down list to indicate the order that the directories are scanned:

  • Ascending

  • Descending

Criteria

Select one of the following from the drop-down list to indicate the scanning criteria:

  • Name

  • Size

  • TimeStamp

Order Operator

Select one of the following from the drop-down list to indicate the order of the scanned files if the Criteria parameter (above) is Size or TimeStamp:

  • Greater than

  • Less than

  • Equal to

File Size

Enter the file size (in bytes) if the Criteria parameter is Size.

File Date

Enter the file date (DD/MM/YYYY) if the Criteria parameter is TimeStamp.

File Time

Enter the file time (HH:MM:SS) if the Criteria parameter is TimeStamp.

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.

The default is 3000 milliseconds.

Log Type

Determines the format of the generated log file. Select one of the following from the drop-down list:

  • Text (default)

  • CSV

  • XML

Log File Name

Enter the name of log file if one is returned.

Return File To

Click to open the Variables List. Select a variable where the file being scanned for is returned. The file can be returned to a variable defined by the user or to a User BLOB.

Return Destination Filename To

Click to open the Variables List. Select a variable where the filename is returned if you are moving or renaming a file. The file can be returned to a variable defined by the user or to a User String.

Return Source Filename To

Click to open the Variables List. Select a variable that returns the name of the original file that was copied or moved.

Error Code

A Directory Scanner error code.

Click to open the Variables List. Select a variable where the error code is returned, and then click Select.

Related Topics

How to Use Direct Access Methods

Reference
Attachment 
Attachment