The sftp task allows you to transfer files from/to a SSH2 server. Also, the SSH2 server should support SFtp subsystem. Not all SSH2 servers support SFtp.
SFtp Profile
Select the SFtp profile for the SFtp server you need to connect to.
You should have previously created a SFtp profile using the SFtp Profiles
menu item.
SFtp 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. Execute
privilege is required for the remote directory for all SFtp functions.
Read privilege is required for SFtp Get. Write privilege is required
for Ftp Put and SFtp Delete functions. Note that the path is case
sensitive for unix SFtp servers. If you are transferring files
from the Default SFTP login directory you can leave this field blank.
Local Directory
Enter the full path name of the local directory where you need to put
or get files.
Filename
Enter the name 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
in addition to the normal wildcard search
Append date/time To filename
You can choose to append either the date
or the date and time or custom code you set to the name of the transferred
file. If your filename has an extension, the date or date and time
is appended before the extension. This feature is useful for archive purposes.
Backup to Local Directory
Enter the full path name of the local directory where you need to backup
files. Please note that the Backup to local directory option does not support
subdirectories. i.e. all files will be placed in the backup directory without
creating new subfolders in it.
Backup to Remote Directory
Enter the full path name of the remote directory where you need to
backup files. Please note that the Backup to remote directory option does
not support subdirectories. i.e. all files will be placed in the backup
directory without creating new subfolders in it.
Use Staging
If you select this option, the file is first transferred to the local
(get) or remote (put) folders entered. This folder acts as a staging
folder. After the Ftp transfer is complete, the file is then moved
to the final destination folder. This option is useful to prevent
processes from working on files while the Ftp transfer is in progress.
In the staging field, you should enter the full path name of the final
destination directory. Please note that the staging option does not support
subdirectories. i.e. all files will be placed in the final destination
directory without creating new subfolders in it.
Umask Permissions
The umask has be entered in 4 digit octal format. The umask command
is used to set the permissions of all files that are put onto the server.
Leave this field blank to use the default Sftp server permissions for the
transferred files. The Umask is the reverse of the normal file permissions,
i.e. 0777^umask = permissions.
Examples:
0077 = -rwx------ (all permissions for user, no permissions for group
and world)
0000 = -rwxrwxrwx (all permissions for user, group and world)
0022 = -rwrxr-xr-x (all permissions for user, read+execute permissions
for group and world)
0033 = -rwxr--r-- (all permissions for user, read permission for group
and world)
0011 = -rwxrw-rw- (all permissions for user, read+write permissions
for group and world)
Delete Source file
You can choose to delete the source file after a successful transfer.
If the SFtp 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 continously scan and 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.
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.
Place files in new subdirectory
If you select "None", no new subdirectory is created within the Target
Directory.
If you select Date, a new subdirectory based on the date is created
within the Target Directory. All files are placed in this directory.
If you select Date, a new subdirectory based on date and time is created
within the Target Directory. All files are placed in this directory.