FTP Directory Commands

 

The following commands all affect the FTP directory.

 

 

 

Script Editor > Expand Internet Category > FTP Directory Commands

 

 

FTP Change Directory

The FTP Change Directory command changes the current working directory on the FTP site. The user can select a specific directory to change. This can be an absolute path or a relative path. This functionality is identical to the Change Directory/Folder command that applies to folders on a computer drive. However, this command also adds the ability to go up a level and switch to the previous directory in the hierarchy.

 

 

üNote: Path delimiters in an FTP server require the forward slash '/', not the backslash '\' that Windows uses.

 

Go up a level

This options moves up one folder in the FTP server folder hierarchy.

 

Specific Directory

This option moves to a specific folder in the FTP server.

 

 

FTP Delete Directory

This command deletes a directory from the FTP server.

 

Directory

Insert the directory to be deleted from the FTP server.

 

 

FTP Create Directory

This command creates a new directory on the FTP Server.

 

Directory

Insert the new directory name to be created.

 

 

Response from Host

This option is available for the FTP Change, Delete and Create Directory commands. The message generated by the FTP server, whether a success or failure, is saved to the variable assigned. There are several ways to monitor the variable to determine the status of the operation.

 

1.Place the variable in a Text Box Display command to display the results at the end of the macro.

2.Use the Variable Modify String command to save the variable results to a text file for later review.

3.Send the results via email to an email account.

 

 


 

 

FTP Get Current Directory

The FTP Get Directory command retrieves the present working directory on the FTP Server. This information is saved to the variable selected. If for some reason the retrieval was not successful the error message information is saved to the variable.

 

 

FTP List Directory

This command retrieves a listing of all files in the current directory on the FTP Server.

 

File Mask

Specifies the files being looked for in the directory. Wildcards are permitted.

 

Detailed List

This returns all values about the files in the current directory, such as file size, permissions and the owner.

 

Variable to save result to

The information retrieved is stored in the variable selected.

 

 

üNote: Before using any of these functions, the macro script first requires the FTP Site Connect command to connect to the site. When all FTP actions have been completed, use the FTP Site Disconnect command to disconnect from the site.