Ftp

Before creating an Ftp task, we recommend that you use the FTP browser utility to get a connection. The ftp task allows you to transfer files from/to a server.

Ftp Profile
Select the ftp profile for the ftp server you need to connect to. You should have previously created an ftp profile, using the Ftp Profiles menu item.

Ftp Option
Use 'Get' to transfer files from the server to your local system. Use 'Put' to transfer files from your local system to the server.  Use 'Delete' to delete files from the server.

Remote Directory
This is the most difficult parameter to enter correctly.  We recommend that you use the FTP browser utility to determine the value of the full pathname of the remote directory. Execute privilege is required for the remote directory for all Ftp functions.  Read privilege is required for Ftp Get.  Write privilege is required for Ftp Put, and Ftp Delete functions.  If you are transferring files from the Default FTP login directory, you can leave this field blank.

Local Directory
Enter the full pathname of the local directory, where you need to put or get files.

Backup to Local Directory
Enter the full pathname of the local directory, where you need to backup files. The Backup to local directory option does not support subdirectories. All files will be placed in the backup directory, without creating new subfolders in it.

Backup to Remote Directory
Enter the full pathname of the remote directory, where you need to backup files. The Backup to remote directory option does not support subdirectories. All files will be placed in the backup directory. No subfolders are created in the backup directory.

Use Staging
If you select this option, the file is first transferred to the local (get) or remote (put) folder entered.  This folder acts as a staging folder.  After the Ftp transfer is complete, the file is moved to the final destination folder.  This option prevents processes from working on files, while the Ftp transfer is in progress.  In the staging field, you should enter the full pathname of the final destination directory. The staging option does not support subdirectories. All files will be placed in the final destination directory. No subfolders are created in the final destination directory.

Filename
Enter the filename filter for the files you wish to copy  using the following wildcard rules. This field also supports dynamic variables.  Using dynamic variables, you can select a file based on current date/time.

Folder Path Filter
Leave this field blank if you want all folders to be processed. If you need specific folders to be processed, then enter the folder name or path, using the following wildcard rules.  If a folder passes the filter, then all its subfolders will also pass the filter.
Simple Example: Folder = c:\test  , subfolders = john, john\old, sam, sam\old, joe, joe\old
Folder path filter = john    .  john and john\old are processed
Folder path filter = jo       .  john,  john\old, joe, joe\old are processed
Folder path filter = old     .  sam\old,  john\old, joe\old are processed
Folder path filter = test     .  all files in c:\test and its sub folders are processed
Folder path filter = john\old.   only john\old is processed.
Folder path filter = c:\test\john   .  john and john\old are processed

Rename Filename
Please see Rename Help

Transfer Type
File transfer type can be either Ascii or Binary.  Binary mode will transfer .exe, .jpg or other binary files.  Binary mode should be the default transfer mode.  Ascii mode can be used to transfer text or html files.  If you transfer binary files in ascii mode, you will not get the entire file.

Append date/time To filename
You can choose to append either the date, or the date/time, or custom code. If your filename has an extension, the date or date and time is appended before the extension. This feature is useful for archive purposes.

Maintain Timestamp (for Get only)
The task can reset the transferred local files timestamp to match the remote files timestamp. This applies ONLY to the GET option.

Reset Local Timestamp (for Put only)
There is no Ftp standard to reset the remote files timestamp, to match the local files timestamp after an Ftp PUT. Hence, we provide the option to reset the source local files timestamp, to match the newly transferred remote files timestamp. There is a new proposal, to reset the remote file timestamp, using the MFMT (Modify file modification time) command. However, not many Ftp servers support the MFMT command. (Many Ftp servers incorrectly allow setting the remote file timestamp, using the MDTM command. This MDTM command is not an Ftp standard to set the remote file timestamp. The Ftp task does not reset the timestamp through this MDTM command.)

Delete Source file
You can choose to delete the source file, after a successful transfer.  If the ftp transfer fails, the source file will not be deleted.

Transfer with temporary extension
The file is transferred with a temporary extension, and then renamed to the desired name, after the transfer is complete.  This is useful if you have automated scripts/programs, which continuously work on transferred files with certain extensions.  This ensures that the automated script will not work on a partially transferred file.

Log Transfer
You can choose to log the transfer into the Ftp Log.

Transfer Modified files
If you choose this option, files are transferred only if the source file is newer than the target file. You can specify an offset to be added to the remote ftp files timestamp, while comparing the timestamps.

Ftp server time offset
Sometimes, a Ftp server is in a different time zone from your local system.   You can specify an offset to be considered while determining which file (local or remote) is newer.  The remote file timestamp is not changed.  Enter a positive number to add an offset to the actual remote ftp file timestamp.  Enter a negative number to subtract an offset from the actual remote ftp file timestamp.  For example, consider a file with:
Actual Local file timestamp = June 1, 2005, 10:00 PM
Actual Remote file timestamp = Jun 1, 2005, 10:30 PM

Offset = 0
Put Option: File will not be transferred, since remote file is newer than local file
Get Option:  File will be transferred, since remote file is newer than local file

Offset = -60  (Remote file timestamp is now calculated as 9:30 PM)
Put Option: File will be transferred, since calculated remote file timestamp is older than local file timestamp.
Get Opton: File will not be transferred, since calculated remote file timestamp is older than local file timestamp.

Transfer Modified files using Ftp Log
If you choose this option, files are transferred only if the source file date is newer than the source file date entry in the Ftp Log.  For this option to work correctly, you should also enable the 'Log Transfer' option.  If the source file path is not found in the Ftp log, then the file is always transferred.

Date Filter
If you need to filter files based on file modified date, select this option. For the between option, enter 2 values separated by '-' (2-4 etc..). Examples:
Older than 5 Minute, Newer than 2 Day, Between 3-5 Day, Between 1-4 Hour

File Permissions
For the PUT option, you can reset the permissions of the file, after the file is transferred to the server.  The site must support the "SITE chmod" command. This is normally valid only on UNIX-based systems.
Examples for field entry:
644 = rw- for USER, r-- for GROUP, r-- for WORLD
755 = rwx for USER, r-x for GROUP, r-x for WORLD
754 = rwx for USER, r-x for GROUP, r-- for WORLD
where r = read, w = write, and x = execute permissions.