FTP - Log Off |
<AMFTPLOGOFF SESSION="text"> |
Description:
Ends a transaction with a File Transfer Protocol (FTP) server that was previously started with an FTP Log On step and ends the associated session.
Used to log off after transmissions with an FTP server has completed.
Session
Property |
Type |
Required |
Default |
Markup |
Description |
Session |
Text |
Yes |
FTPSession |
SESSION="FTPSession2" |
Specifies the session name to identify this log off request. |
NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder. |
Example 1: This task will log onto an FTP site, download a single file and log off. In order for this task to work in your environment, please make the appropriate modifications in the properties of each activity.
<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: This sample task demonstrates the activities used to download files from one FTP server to another. The first two steps logs onto 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 off each FTP server. 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="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" /> |