Salesforce

FTP - Methods (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

FTP – Methods

The following methods are used to configure the FTP component:

Note:

The FTP component's Direct Access Methods do not support environment variables.

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

Name

Parameters

Description

Append File appends a file on a remote server directory.

Source File Name

The full path and name of the file that is being transferred to the FTP server. (The path and name should be the original location and name of the file on the local computer.)

Destination File Name

The full path and name of the file where it is put on the FTP server. The path and name should be the name of the file and its location on the FTP server.

For example: Folder1\Folder2\Test.txt

Transfer Mode

Select the mode of transfer from the drop-down list:

  • ASCII

  • Binary

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Change Directory changes the remote server current working directory.

Directory Name

Enter the name of the FTP server working directory the user wants to change to.

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Delete File deletes a file from a remote server directory.

File Name

The full path and name of the file being deleted from the FTP server. The path and name should be the location and name of the file on the FTP server.

For example: Folder1\Folder2\Test.txt

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Directory Listing lists the directory content where data is returned in a predefined XML format.

Directory Name

Enter the name of the FTP server directory the user wants to list.

Output XML

Select one of the following from the drop-down list, to define whether you want the output BLOB to be an XML file:

  • Yes

  • No

Directory List

Click to open the Variables List. Select a variable where the Directory Contents are returned, and then click Select.

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

File Exists checks if the file exists on the remote server directory.

Name

Enter the name of the file that you want to check.

File Exists

This parameter is used to indicate whether the file exists on the remote server directory.

You can specify where you want this information to be held by clicking to open the Variables List.

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Get File gets a file from a remote server directory.

Source File Name

The full path and name of the file being retrieved from the FTP server. The path and name should be the original location and name of the file on the FTP server.

For example: Folder1\Folder2\Test.txt

Destination File Name

The full path and name of the file where it is copied on the local computer. (The path and name should be the name of the file and its location on the local computer.)

Transfer mode

Select the mode of transfer from the drop-down list:

  • ASCII

  • Binary

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Get Operating System provides details about a selected server’s operating system, and where the data is returned.

Operating System

Click to open the Variables List. Select a variable where the type of Operating System is returned.

This method returns Unicode data.

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Local Change Directory is used for changing the default local directory for the following methods: Get File, Multi Get,

Put File, Multi Put.

Use this method to change the default local directory from %Magicxpi% to, for example, "d:\temp".

Directory Name

The full path of the directory being changed on the FTP server. To reset the default Local Change Directory folder (to %Magicxpi%), configure the Local Change Directory method with no value in the Directory Name parameter.

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Make Directory makes a directory in a remote server directory.

Directory Name

The full path of the directory being created on the FTP server.

Includes Sub Directories

Select one of the following from the drop-down list to determine whether you want to include sub directories in the main directory:

  • Yes

  • No

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Multi Del deletes multiple files from a remote server directory.

Filter

A filter definition uses wildcard characters (*, ?) to filter files that are named in a specific way.

Includes Sub Directories

Select one of the following from the drop-down list to determine whether you want to include sub directories in the main directory:

  • Yes

  • No

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Multi Get gets multiple files from a remote server directory.

Destination Folder

The full path and name of the folder where it is copied on the local computer. (The path and name should be the name of the folder and its location on the local computer.)

Filter

A filter definition uses wildcard characters (*, ?) to filter files that are named in a specific way.

Transfer Mode

Select the mode of transfer from the drop-down list:

  • ASCII

  • Binary

Include Sub Directories

Select one of the following from the drop-down list to determine whether you want to include sub directories in the main directory:

  • Yes

  • No

Overwrite

Select one of the following from the drop-down list to determine whether you want to overwrite existing files:

  • Yes

  • No

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Multi Put puts multiple files on a remote server directory.

Destination Folder

The full path and name of the folder where the file is to be copied on the FTP server.

Filter

A filter definition uses wildcard characters (*, ?) to filter files that are named in a specific way.

Transfer Mode

Select the mode of transfer from the drop-down list:

  • ASCII

  • Binary

Include Sub Directories

Select one of the following from the drop-down list to determine whether you want to include sub directories in the main directory:

  • Yes

  • No

Overwrite

Select one of the following from the drop-down list to determine whether you want to overwrite existing files:

  • Yes

  • No

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Put File puts a file on a remote server directory.

Source File Name

The full path and name of the file that is being transferred to the FTP server. (The path and name should be the original location and name of the file on the local computer).

Destination File Name

The full path and name of the file where it is put on the FTP server. The path and name should be the name of the file and its location on the FTP server.

For example: Folder1\Folder2\Test.txt

Transfer mode

Select the mode of transfer from the drop-down list:

  • ASCII

  • Binary

Overwrite

Select one of the following from the drop-down list to determine whether you want to overwrite existing files:

  • Yes

  • No

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Remove Directory removes a directory that resides in a remote server directory.

Directory Name

The full path of the directory being removed from the FTP server.

Include Sub Directories

Select one of the following from the drop-down list to determine whether you want to include sub directories in the main directory:

  • Yes

  • No

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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

Rename File renames a file or directory that resides in an FTP server directory.

Source File Name

The original location and name of the file being moved to and renamed on the FTP server. The path and name should be the original location and name of the file on the FTP server.

Destination File Name

The full path and name of the file after it is moved to and renamed on the FTP server. The path and names should be the new names of the file and its location on the FTP server.

Error Code

This parameter is returned, with the corresponding error code, when an error occurs.

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