|
FTP - Upload file(s) |
Declaration
<AMFTP ACTIVITY="upload" SESSION="text" SERVER="text" USERNAME="text" PASSWORD="text (encrypted)" ANONYMOUSLOGIN="YES/NO" TYPE="text (options)" PORT="number" PASSIVEMODE="YES/NO" COMPRESSION="YES/NO" ENCRYPTDATACHANNEL="YES/NO" IGNOREINVALIDCERTIFICATE="YES/NO" CLEARCOMMANDCHANNEL="YES/NO" TUMBLEWEEDSERVER="YES/NO" FIPS="YES/NO" FTPOPTIONS="text (options)" CERTIFICATESOURCE="text (options)" CERTIFICATEISSUERID="text" CERTIFICATESERIAL="text" CERTIFICATE="text" CERTIFICATEPASSPHRASE="text (encrypted)" CERTIFICATEPRIVATEKEY="text" TLSCIPHERS="text (options)" TLSOPTIONS="text (options)" SSLVERSION="text (options)" SFTPVERSIONS="text (options)" SFTPAUTHTYPE="text (options)" SFTPHOSTKEY="text (options)" SFTPHOSTKEYNOTFOUND="text (options)" CIPHERSELECTION="text (options)" SSHENCRYPTION="text (options)" SSHKEYEXCHANGE="text (options)" SSHMAC="text (options)" SSHPUBLICKEY="text (options)" LOGFILE="text" OVERWRITELOG="YES/NO" TRANSFERBLOCKSELECTION="text (options)" "PIPELINELENGTH="number" UPLOADSIZE="number" DOWNLOADSIZE="number" TIMEOUT="number" MEASURE="text (options)" UPLOADBUFFERSIZE="number" PROXYTYPE="text (options)" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text (encrypted)" SOURCE="text" DEST="text" THREADS="number" RESULTDATASET="text" EXCLUDE="text" RE="YES/NO" ISNEWERTHAN="text" ISOLDERTHAN="text" TRANSFERTYPE="text (options)" VALIDATECHECKSUM="YES/NO" CHECKSUMTYPE="text (options)" SUBFOLDERS="YES/NO" KEEPFOLDERSTRUCT="YES/NO" ONLYFOLDERSTRUCT="YES/NO" TRANSFEROPTION="text (options)" SUPPRESSADDITIONALOPERATIONS="YES/NO" ISNEWER="YES/NO" ONLYIFEXISIT="YES/NO" MATCHCASE="YES/NO" KEEPDATETIME="YES/NO" ARCHIVETURNOFF="YES/NO" TIMEZONE="text (options)" ATTRFILTER="text (options)" />
Description
Uploads one or more local files to an FTP server. This activity supports multi-file uploads. To indicate more than one file, use wildcards (for example, * or ?). To indicate multiple files or wildcard masks, separate them with a pipe character (for example, *.txt|*.bak). See File Masks & Wildcards for more details.
Practical Usage
Commonly used to send files to other computers across the network or Internet. Can also be used to backup files or complete directory structures.
Parameters
Connection
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Connection | --- | --- | --- | --- | Specifies the type of connection method to use with this FTP activity.The available options
are:
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Session | Text | Yes, if Connection is set to Session | FTPSession1 | SESSION="FTPSession2" | The name of an existing session to use with this activity. This allows several FTP activities to be linked to a specific session. Numerous sessions can be used within a single task. This parameter is required if the Connection parameter is set to Session. |
Connection - Host > Credentials
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Host | Text | Yes | (Empty) |
|
The IP address (xxx.xxx.xxx.xxx) or the server and domain name (for example, server.domain.com) of the FTP server. |
Username | Text | Yes |
(Empty) |
USERNAME="Clark.Kent" | The username to use when logging on to the FTP Server. The username is preconfigured at the server level. |
Password | Text | Yes | (Empty) | PASSWORD="password" | The password to use when logging on to the FTP Server. Manually enter a password or click the Credentials key icon to select from the list of credential variables available to you that may correspond to this activity. When the step is created using the Task Builder it is written to the task encrypted. |
Use anonymous log on | Yes/No | No | No | ANONYMOUSLOGIN="YES" | If selected, the FTP server is logged on as an "Anonymous" user and the Username and Password parameters are disabled (disabled by default). The server must be configured to accept anonymous connections. |
Connection - Host > Advanced
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Connection type | Text (options) | Yes | FTP (standard) |
|
The
type of FTP connection to use. The available options
are:
|
Port | Text | Yes | 21 | PORT="1000" | The
port to use to connect to the FTP server. Most standard
FTP servers operate on port 21 (the default port specified) however,
this parameter can be customized in case the FTP server operates
on other ports. NOTE: Other default ports may be assigned depending on the server connection
type selected. |
Passive mode (for firewalls) | Yes/No | No | No | PASSIVEMODE="YES" | Determines
how an FTP data connection is made. If selected, Automate issues
the PASV command and the server tells Automate where to establish
the data connection. Automate initiates both connections to the
server, solving the problem of firewalls filtering the incoming
data port connection to the client from the server. If disabled (default), the PORT method is used. Automate listens for a data connection
which is established by the server and the PORT command tells
the server where to connect to. Automate then connects to the
server where the server indicated. This method is sometimes used
with some proxy configurations. However, some proxy configurations
require PORT transfers and some FTP servers do not support PASV
transfers. This parameter is available only if the FTP (standard), FTP with SSL/TLS (implicit), or FTP with SSL/TLS (explicit) option is selected from the Connection type parameter. |
Use compression | Yes/No | No | No | COMPRESSION="YES" | If selected, data is compressed using a single algorithm to reduce the total amount of data that is transmitted. If transmission speeds are slow, transfers can be sped up significantly when using compression, particularly if text files are being transferred. Media files (for example, JPEG and MPEG) are usually compressed already, thus, there will be little or no benefit in using compression. |
Encrypt data channel | Yes/No | No | No | ENCRYPTDATACHANNEL="YES" | If
selected, specifies that all data channel communication between
the client and server are to be encrypted (disabled by default). This parameter is available only if the FTP with SSL/TLS (implicit) or FTP
with SSL/TLS (explicit) option is selected from the
Connection type parameter. It may NOT be advantageous to use data channel encryption when performing transfers under the following scenarios:
|
Ignore invalid server certificates | Yes/No | No | No | IGNOREINVALIDCERTIFICATE="YES" | If selected, specifies that this action will ignore invalid certificates when connecting to an FTP server using SSL (disabled by default). This parameter is available only if the FTP with SSL/TLS (implicit) or FTP with SSL/TLS (explicit) option is selected from the Connection type parameter. |
Clear command channel | Yes/No | No | No | CLEARCOMMANDCHANNEL="YES" | If
selected, this option enables support for the Clear Command Channel
(CCC) functionality (disabled by default). The CCC command can be issued by a remote
FTPS client and will cause Automate's FTP client to fall out of
secure mode and back in to unsecured mode. This option is useful
for clients who only need to secure the authentication portion
of the session. Once the USER/PASS has completed, some clients
will use CCC to return to unsecured mode, which is faster. This parameter is available only if the FTP with SSL/TLS (implicit) or FTP with SSL/TLS (explicit) option is selected from the Connection type parameter. |
Enable Tumbleweed mode | Yes/No | No | No | TUMBLEWEEDSERVER="YES" | If selected, allows compatibility with Tumbleweed Secure Content Delivery (disabled by default). This parameter is available only if the FTP with SSL/TLS (implicit) or FTP with SSL/TLS (explicit) option is selected from the Connection type parameter. |
Enable FIPS mode | Yes/No | No | No | FIPS="YES" |
If selected, FIPS 140-2 validated cryptography mode is enabled (disabled by default). The Federal Information Processing Standard (FIPS) Publication 140-2 specifies the security requirements of cryptographic modules used to protect sensitive information. Most government agencies such as the Department of Defense and companies in the public sector such as healthcare, financial and manufacturing require FIPS validation to protect the integrity of data traffic traveling across their networks. This parameter is available only if the FTP with SSL/TLS (implicit), FTP with SSL/TLS (explicit), SFTP (password), or SFTP (key) option is selected from the Connection type parameter |
FTP options | Text (options) | Yes | None |
|
Specifies
the advanced FTP option to apply during the transfer. The following
lists all FTP options supported by Automate's built-in FTP
client:
|
Client certificate source | Text (options) | No | No certificate |
|
FTP
over SSL allows sessions to be encrypted between an FTP client
and server. This property is used to select the source of the
certificate. A certificate is a digitally-signed statement that
binds the value of a public key to the identity of the person,
device, or service that holds the corresponding private key. One
of the main benefits of certificates is that hosts no longer have
to maintain a set of passwords for individual subjects who need
to be authenticated as a prerequisite to access. Instead, the
host merely establishes trust in a certificate issuer. The available options are:
This option is available only if the FTP with SSL/TLS (implicit) or FTP with SSL/TLS (explicit) option is selected from the Connection type parameter. |
Certificate issuer | Text | No | (Empty) | CERTIFICATEISSUERID="Name" | Specifies information regarding the certification authority that issued the certificate. This parameter is available only when Certificate store option is selected from the Client certificate source parameter. |
Certificate serial number | Number | No | (Empty) | CERTIFICATESERIAL="c7 f5 fa f8 6d ab 77 87 43 4a 11 43 f1 cd 3c 0f" | Specifies the unique serial number that the issuing certification authority assigns to the certificate. The serial number is unique for all certificates issued by a given certification authority. This parameter is available only when Certificate store option is selected from the Client certificate source parameter. |
Certificate file | Text | No | (Empty) | CERTIFICATE="C:\Temp\Certificate_Location" | Specifies the path and file name of the certificate file. This parameter is available only when the File(s) option is selected from the Client certificate source parameter. |
Passphrase | Text | No | (Empty) | CERTIFICATEPASSPHRASE="passphrase" | Specifies the passphrase used to authenticate connection. Manually enter a passphrase or click the Credentials key icon to select from the list of credential variables available to you that may correspond to this activity. A passphrase is a password that comprises a whole phrase. This parameter is available only when the File(s) option is selected from the Client certificate source parameter. |
Certificate private key | Text | No | (Empty) | CERTIFICATEPRIVATEKEY="C:\Temp\Private_Key" | Specifies the path and file name of the Private key file. This parameter is available only when the File(s) option is selected from the Client certificate source parameter. |
TLS cipher(s) | Text (options) | Yes | All | TLSCIPHERS="All" | The specified group of allowed TLS/SSL cipher suites. Connection type must be host to use. The following cipher options are:
|
TLS options | Text (options) | Yes | None | TLSOPTIONS="None" | The specified TLS/SSL versions allowed. Connection type must be host to use. Connection type must be host to use. The following cipher options are:
|
SSL versions | Text (options) | No | SSL30,TLS10,TLS11 | SSLVERSION="SSL3" | Specifies the versions of SSL (Secure Sockets Layer) and/or TLS (Transport Layer Security) protocols to use to secure the connection to the server. To select multiple versions, manually enter and separate each version with a comma (see default setting). The available options are:
|
SFTP versions | Options | No | Sftp2,Sftp3,Sftp4 | SFTPVERSIONS="Sftp5,Sftp6" | Indicates
the SFTP versions that the server supports.
To select multiple versions, manually enter and separate each version with a comma (see default setting). The available options are:
This parameter is available only if the Connection type parameter is set to SFTP (password) or SFTP (key). |
Authentication type | Text (options) | No | Auto | SFTPAUTHTYPE="Password" | Indicates
the SFTP authentication type that the server supports.
To select multiple types, manually enter and separate each version with a comma (for example, Password,Hostbased). The available options are:
This parameter is available only if the Connection type parameter is set to SFTP (password) or SFTP (key). |
Ignore sftp server's host key/Validate sftp server's host key | Options | No | None | SFTPHOSTKEY="validate" | Indicates whether to ignore or validate the SFTP server's host key. This parameter is available only if the Connection type parameter is set to SFTP (password) or SFTP (key). |
If server host key is not found then | Options | No | Store it | SFTPHOSTKEYNOTFOUND="throw_error" | Indicates
what action to perform if the server host key is not found. The available options are:
This parameter is available only if the Validate sftp server's host key parameter is selected. |
Cipher(s) selection | Options | No | Auto | CIPHERSELECTION="custom" | Specifies the cypher algorithm to use. The available options are:
|
Encryption algorithm(s) | Text (options) | Yes | All | SSHENCRYPTION="EA_DES" | Specifies the encryption algorithms to use during the SSH session.
To select multiple algorithms, manually enter and separate each one with a comma (for example, EA_3DES,EA_AES256). The encryption algorithms supported by Automate are:
This parameter is available only if the Cipher selection(s) parameter is set to Custom. |
Key-Exchange algorithm(s) | Text (options) | Yes | All | SSHKEYEXCHANGE="DH_GROUP" | Specifies the key-exchange algorithms to use during the SSH session. To select multiple algorithms, manually enter and separate each one with a comma (for example, DH_GROUP,RSA1024_SHA1). The key-exchange algorithms supported by Automate are:
This parameter is available only if the Cipher selection(s) parameter is set to Custom. |
MAC algorithm(s) | Text (options) | Yes | All | SSHMAC="HMAC_SHA1_96" | Specifies the MAC algorithms to use during the SSH session. To select multiple algorithms, manually enter and separate each one with a comma (for example, HMAC_SHA1,UMAC32). The MAC algorithms supported by Automate are:
This parameter is available only if the Cipher selection(s) parameter is set to Custom. |
Public key algorithm(s) | Text (options) | Yes | All | SSHPUBLICKEY="X509_SIGN_RSA" | Specifies the public key algorithms to use during the SSH session. To select multiple algorithms, manually enter and separate each one with a comma (for example, DSS,RSA). The public key algorithms supported by Automate are:
This parameter is available only if the Cipher selection(s) parameter is set to Custom. |
Log file | Text | No | (Empty) | LOGFILE="c:\temp\error.log" | The location of a detailed FTP log file. This log file contains the exact text of the FTP session which can be useful in diagnosing particular errors or elusive problems. |
Overwrite existing log file | Yes/No | No | Yes | OVERWRITELOG="NO" | If selected (default), specifies the log file should be overwritten if the same file already exists. If disabled, the file will not be overwritten, however, an error will occur at runtime as a result. |
Transfer blocks | Text (options) | Yes, if the Connection type parameter is set to SFTP (password) or SFTP (key) | Auto-Adjust |
|
Specifies how blocks are transferred over SFTP. The available options are:
|
Pipeline length | Number | Yes, if the Transfer blocks parameter is set to Custom | 1 | PIPELINELENGTH="13" | Specifies the pipeline length to use when transferring blocks over SFTP. |
Upload block size | Number | Yes, if the Transfer blocks parameter is set to Custom | 16384 | UPLOADSIZE="163548" | Specifies the upload block size to use during SFTP transfers. |
Download block size | Number | Yes, if the Transfer blocks parameter is set to Custom | 16384 | DOWNLOADSIZE="163548" | Specifies the download block size to use during SFTP transfers. |
Timeout | Number | Yes | 30 | TIMEOUT="60" | Indicates a connection time out to customize how long Automate will wait before aborting a connection attempt. If connection is not established within the time out value specified, it is automatically aborted. The default value is 30 seconds. |
Measure (unlabeled) | Text (options) | Yes | seconds |
|
The
time measurement corresponding to the value entered in
the Timeout parameter.
The available options are:
|
Upload buffer size (bytes) | Number | Yes |
|
UPLOADBUFFERSIZE="54443" | The
upload buffer size value (in bytes) for files being uploaded.
In some cases changing the upload buffer size can make a difference;
particularly in transfers over high loss or high speed connections
where latency plays an important role. Depending on the connection type, the default value/maximum buffer size will vary:
NOTE: Setting the Upload buffer size value too high for slow connections
might cause timeouts and the transfer speed calculation may become
inaccurate. |
Connection - Host > Proxy
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Proxy type | Text (options) | No | None |
|
Specifies the proxy protocol to use. If you are unsure of
the value to use in this parameter, contact your network administrator.
The available options are:
|
Proxy server | Text | Yes | (Empty) | PROXYSERVER="proxy.host.com" | The host name (for example, server.domain.com) or IP address (for example, xxx.xxx.xxx.xxx) of the proxy server. |
Proxy port | Text | Yes | 1028 | PROXYPORT="1000" | The
port to use to connect to the FTP server. Most standard
FTP servers operate on port 1028 (the default port specified), however,
this parameter can be customized in case the FTP server operates
on other ports. NOTE: Other default ports may be assigned
depending on the server connection type selected. |
Use authentication | --- | --- | --- | --- | If
selected, specifies the connection to the proxy server requires
authentication (disabled by default). NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Proxy username | Text | No | (Empty) | PROXYUSERNAME="username" | The username to use to authenticate with the proxy server. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication. |
Proxy password | Text | No | (Empty) | PROXYPASSWORD="encrypted" | The password to use to authenticate with the proxy server. Manually enter a password or click the Credentials key icon to select from the list of credential variables available to you that may correspond to this activity. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication. |
File
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Local file(s) | Text | Yes | (Empty) |
|
Specifies
the files to upload. This can be a fully qualified UNIX style
path and file name (preferred) or a single file (requires use of
the FTP - Change folder activity).
Wildcard characters (for example, * or ?) are used to upload files matching
a certain mask. Multiple file and/or file masks are specified
by separating the entries with a pipe character (for example, *.txt|*.bak). See File
Masks & Wildcards for more information. NOTE: Files with invalid paths are ignored at runtime. |
Remote file(s) | Text | Yes | (Empty) |
|
Specifies the destination folder and (optionally) file names of the files to upload. This can be a fully qualified path or a file name. Enter the file names manually in the provided text box or click the folder icon to open the FTP Browser which allows connection to the server in order to browse available files and folders. Folders that do not exist are automatically created at runtime. |
Number of threads | Text | Yes | 1 | THREADS="2" | Specifies the number of threads to use for file uploads. Enter the number of threads that corresponds to the number of open FTP connections. |
Create and populate upload dataset | Text | No | (Empty) | RESULTDATASET="theDataset" | Specifies the name of a dataset to create at runtime and populated with information regarding the files uploaded files. See Datasets below for the fields this dataset creates. |
File Options
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Exclude mask | Text | No | (Empty) | EXCLUDE="*.txt" | If selected, this activity omits any files matching the masks specified in this parameter. File names or wildcard masks (for example, * or ?) can be used and multiple entries can be specified by separating each with a pipe character (for example, *.txt|*.bak). |
Regular expression | Yes/No | No | No | RE="YES" | If selected, specifies whether the value in the Exclude mask parameter is a regular expression. Regular expression, also referred to as regex or regexp, provide a concise and flexible means for matching strings of text. This parameter is disabled by default. |
Only if newer than | Date | No | (Empty) | ISNEWERTHAN="%DateAdd("s",-30,CStr(Now()))%" | If selected, this activity only uploads files if the source file is newer than
the date/time specified. If this parameter is left disabled, the
date/time of the files will be ignored.
Click the Custom button to select one of several available date/time ranges. Select the Expression option to enter a date expression. |
Only if older than | Date | No | (Empty) | ISOLDERTHAN="%DateAdd("s",-30,CStr(Now()))%" | If selected, this activity only upload files if the source file is older than
the date/time specified. If this parameter is left disabled, the
date/time of the files will be ignored.
Click Custom to select one of several available date/time ranges. Select the Expression option to enter a date expression. |
Transfer type | Text (options) | Yes | Binary | TRANSFERTYPE="ascii" | Specifies the transfer type to use. The available options are:
|
Validate checksum | Yes/No | No | No | VALIDATECHECKSUM="YES" | If selected, this parameter validates the integrity of data being transferred by calculating a checksum using the selected algorithm in the checksum type drop-down combo box. This parameter is disabled by deafult. |
Checksum type (unlabeled) | Options | No | CRC |
|
Specifies
the checksum algorithm to use. The available options are:
|
Include subfolders | Yes/No | No | No | SUBFOLDERS="YES" | If selected, subfolders are searched for files matching the mask specified in the Local file(s) parameter. This parameter is set NO by default. |
Preserve folder structure | Yes/No | No | No | KEEPFOLDERSTRUCT="YES" | If
selected, subfolders found in the source folder
are created in the destination folder and source files are copied into their respective folders, rather than directly into
the root of the target folder specified in the Remote
file(s) parameter. This parameter is set NO by default. This parameter becomes available when the Include subfolders parameter is selected. |
Only folder structure | Yes/No | No | No | ONLYFOLDERSTRUCT="YES" | If
selected, subfolders found in the source folder
are created in the destination folder, but no files will
be copied. Selecting this option causes any file-specific parameters
to be ignored. This parameter is set NO by default. This parameter becomes available when the Include subfolders parameter is selected. |
Suppress additional operations | Yes/No | No | No | SUPPRESSADDITIONALOPERATIONS="YES" | If selected, additional operations are suppressed during file transfers. This parameter is disabled by default. |
Transfer options | Text (options) | No | Do not overwrite existing file |
|
Specifies
the action to perform if the corresponding target
file already exists. The available options are:
|
Only if newer | Yes/No | No | No | ISNEWER="YES" | If
selected, only files that are newer than those
in the destination folder overwrite existing files. This parameter is disabled by default. This parameter becomes available if the Transfer options parameter is set to Overwrite existing file. |
Only if exists in destination | Yes/No | No | No | ONLYIFEXIST="YES" | If
selected, files that already exist in the
destination folder are be copied from the source. All other files, regardless
of whether they match the mask or other parameter settings are bypassed. This parameter is disabled by default. This parameter becomes available if the Transfer options parameter is set to Overwrite existing file. |
Match case | Yes/No | No | No | MATCHCASE="YES" | If selected, the properties set within this activity are case sensitive in relation to the FTP server. . This parameter is disabled by deafult. |
Preserve date and time | Yes/No | No | No | KEEPDATETIME="YES" | If selected, the original date/time of the transferred file is preserved. If disabled (default), the date/time of the file is updated to the current time once it is downloaded. |
Turn archive attribute off | Yes/No | No | No | ARCHIVETURNOFF="YES" | If selected, the archive attribute of the source file is switched OFF. The Windows archive attribute is generally used to track whether a file has been backed up. By turning the source file's archive attribute off, this indicates to many backup programs that the file has already been backed up. This parameter is disabled by default. |
FTP server timezone | Text (options) | No | Varies, based on local timezone | TIMEZONE="(UTC-04:00) Atlantic Time (Canada) [Atlantic Standard Time]" |
Indicates the timezone to set for the FTP server. This is useful if file date/time specifications are set for this activity and the FTP server is in a different timezone than that of the local machine. This property converts the local time into the server timezone selected. This parameter becomes available if the Transfer options parameter is set to Overwrite existing file and the Only is newer parameter is selected. |
File Attributes
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
File attributes | Text (options) | No | Doesn't matter | ATTRFILTER="+R+A-H" (compress read-only & archive files but not hidden files) | Instructs
the activity to filter which files to act on, based on whether
the file's original attribute settings match the attribute settings
specified in this parameter. In Task Builder's visual mode, drop-down boxes are provided within the activity's settings
to assist in the selection of attribute settings. In Task Builder's AML mode,
a text item must be entered that contains the original
attribute mask of the files you wish to affect. For example, if Read-only
attribute is set to Off
(in visual mode) or -R (in AML mode) , only source files with the Read-only attribute
turned off are affected. Source files with Read-only attribute turned
on will be ignored. The available options
are:
|
Additional Notes
Datasets
A dataset is a multiple column, multiple row container object where every column represents a particular variable, and each row corresponds to a given member of the dataset in question. Using the Create and populate dataset parameter, this activity creates and populates a dataset containing specific fields (rows) in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).
Name | Data Type | Return Value |
---|---|---|
theDataset.FTPFileName | Text | The name of the file once it is uploaded. |
theDataset.LocalFileDate | Date | The modified date and time of the local file to upload. |
theDataset.LocalFileName | Text | The local file name of the file to upload. |
theDataset.LocalFileSize | Number | The size of the local file to upload (in kb). |
theDataset.UploadResult | Boolean | The result of the download. If successful, 1 is returned. Otherwise, 0 is returned. |
Example
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Example 1
This task simply logs onto an FTP site, uploads a single file and logs 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 ACTIVITY="upload" SOURCE="C:\Temp\Book1.xlsx" DEST="/home/ftp/Book1.xlsx" />
<AMFTP ACTIVITY="logoff" />
Example 2
This task logs onto an FTP site, uploads all text files located in the C:\Temp directory that are newer than 24 hours and logs 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 ACTIVITY="upload" SOURCE="C:\Temp\*.txt" DEST="/home/ftp/Book1.xlsx" ISNEWERTHAN="%DateAdd("h", -24, CStr( Now() ))%" />
<AMFTP ACTIVITY="logoff" />