FTP - Logoff

Declaration

<AMFTPLOGOFF SESSION="text">

Related Topics

Oveview

Ends a transaction with a File Transfer Protocol (FTP) server previously started with an FTP - Logon step and ends the associated session.

Practical usage

Used to log out after transmissions with an FTP server are complete.

Parameters

Session

Property Type Required Default Markup Description
Session Text Yes FTPSession SESSION="FTPSession2" Specifies the session name to identify this log out request.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Example 1  

The following sample task logs into an FTP site, download a single file and log out:

Copy
<AMFTP ACTIVITY="logon" SERVER="YourFTPHost" USERNAME="YourUsername" PASSWORD="AM1MoyAfpKHilpraHBIX6ei1E/2ZhM5egRHalje6g6YThM=aME" />
<AMFTP SOURCE="/home/ftp_folder/filename.txt" DEST="C:\Temp\filename.txt" />
<AMFTP ACTIVITY="logoff" />

Example 2  

The following sample task demonstrates the activities used to download files from one FTP server to another. The first two steps logs into two separate FTP hosts and creates a unique session name for each connection. The third step performs the file transfer from one server to another. The last two steps are used to log out of each FTP server.  

Copy
<AMFTP ACTIVITY="logon" SESSION="Server1Session" SERVER="ftp.server1.com" USERNAME="theuser" PASSWORD="AM2WknKdIcXr7JaSdh0lRfctA==aME" />
<AMFTP ACTIVITY="logon" SESSION="Server2Session" SERVER="ftp.server2.com" USERNAME="theuser" PASSWORD="AM2WknKdIcXr7JaSdh0lRfctA==aME" />
<AMFTP ACTIVITY="fxp" SOURCE="/Server1/myFolder/*.*" DEST="/Server2/myFolder/*.*" SUBFOLDERS="YES" KEEPFOLDERSTRUCT="YES" OVERWRITE="YES" RESULTDATASET="theDataset" SESSION="Server1Session" DESTINATIONSESSION="Server2Session" />
<AMFTP ACTIVITY="logoff" SESSION="Server1Session" />
<AMFTP ACTIVITY="logoff" SESSION="Server2Session" />