FTP Log On Icon

FTP - Change Folder

Declaration

<AMFTP ACTIVITY="change_folder" FOLDER="text (remote folder location)" SESSION="text" />

See Also

FTP - Advanced | FTP - Change Folder | FTP - Create Folder | FTP - Delete | FTP - Download | FTP - FXP | FTP - Log Off | FTP - Log On | FTP - Remove Folder | FTP - Rename | FTP - Synchronize Folders | FTP - Upload

Description

Changes the current working folder on the FTP server.

Practical Usage

Changes folders on the FTP server so that relative paths may be used. It is not necessary to use this action if absolute paths (or full paths)  are used. A relative path generally contains the file name, whereas, an absolute path is a path that contains the root directory and all other sub directories that contain a file or folder.

Parameters

Folder Properties

Property
Type
Required
Default
Markup
Description

Remote Folder

Text

Yes

(Empty)

FOLDER="/home/folder1"

Specifies a fully qualified UNIX style path to the FTP server folder to change to. Mainly used when relative paths are specified. For example:

Linux absolute path - /home/users/c/computerhope/public_html/cgi-bin

Linux relative path - public_html/cgi-bin

NOTE:This action can be omitted if absolute paths are used.  

Session Properties

Property
Type
Required
Default
Markup
Description

Session

Text

Yes

FTPSession

SESSION="SessionName"

Specifies the session name (created in a previous FTP Log On step) that this activity should originate from. This permits several FTP activities to be linked to a specific session, thus, allowing multiple simultaneous FTP transfers to take place within a single task.  

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Notes

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: This sample task performs a simple FTP folder change before downloading a file. It logs onto FTP host "ftp.mycompany.com" with user name "Godzilla" and session name "MyFTPSession". A Change Folder action changes to folder "/home/ftp" via FTP. An FTP Download action then downloads a file named "report.xls". The last step Logs off of FTP the host.  

In order for this task to work in your environment, please make the appropriate modifications in the properties of each activity.

 

<AMFTP ACTIVITY="logon" SESSION="MyFTPSession" SERVER="ftp.mycompany.com" USERNAME="Godzilla" PASSWORD="AM2WknKdIcXr7JaScp05hfctg==aME" />

<AMFTP ACTIVITY="change_folder" FOLDER="/home/ftp/myRemoteFolder" SESSION="MyFTPSession" />

<AMFTP SOURCE="report.xls" DEST="C:\Logs\report.xls" SESSION="MyFTPSession" />

<AMFTP ACTIVITY="logoff" SESSION="MyFTPSession" />

 

↑ Top of Page