Southsoftware.com
   

Automate FTP transfers with Advanced Task Scheduler

Advanced Task Scheduler allows uploading, downloading and deleting files from an FTP, FTPS (Secure FTP) or SFTP (SSH File Transfer Protocol) server. These operations can be scheduled to run in a specified time, time intervals, or by such events as file modification or creation. Advanced Task Scheduler can run FTP transfers when a specified user is logged on to the system or run them in background even when no user is logged on.

All editions of Advanced Task Scheduler support FTP operations. The examples below are for Advanced Task Scheduler Professional.

Upload a file to an FTP server

To upload a file to an FTP server with Advanced Task Scheduler, create a task with FTP upload shortcut type. Enter path to the file you want to upload to the Local dir field, select the Include files check box and enter name of the file to the field next to check box. FTP server address and directory is specified in the Remote dir field. Server address must start with ftp://, ftps:// or sftp:// prefix.

In the If destination file already exists box you can choose how to process already existing files: leave them or overwrite.

There are FTP options in the bottom of the dialog where you can enter username/password and set tunneling proxy settings.

FTP Upload
Click the picture to enlarge.

Download a file from an FTP server

To download a file from an FTP server with Advanced Task Scheduler, create a task with FTP download shortcut type. Enter FTP server address and directory where the file is located to the Remote dir field. Server address must start with ftp://, ftps:// or sftp:// prefix. Enter path to a folder where you want to download the file to the Local dir filed, select the Include files check box and enter name of the file to the field next to check box.

In the If destination file already exists box you can choose how to process already existing files: leave them or overwrite.

There are FTP options in the bottom of the dialog where you can enter username/password and set tunneling proxy settings.

FTP Download
Click the picture to enlarge.

Upload and download a folder or directory tree

In addition to single file transfer, Advanced Task Scheduler allows FTP operations with multiple files. The Include files and Exclude files fields are used to configure multiple file transfer.

  • When both Include files and Exclude files check boxes are unchecked, all files and all subfolders are uploaded or downloaded.
  • The Include files field contains a list of files or filemasks to include. Several files and filemasks separated by semicolon can be specified.
    For example, "file.txt;*.doc" will include the file.txt file and all .doc files.
  • The Exclude files field contains a list of files or filemasks to exclude. Several files and filemasks separated by semicolon can be specified.
    For example, "file.txt;*.doc" will exclude the file.txt file and all .doc files.
  • To include or exclude files in subfolders, directory separators ("\") can be used in filemasks.
    For example, "file.txt" - include or exclude file.txt file only,
    "dir\file.txt" - include or exclude file.txt file from "dir" subfolder only,
    "*.txt" - include or exclude all .txt files from all subfolders,
    "dir\*.txt" - include .txt files from "dir" and all its subdirectories.
  • To download files without recursing down directories in the file system, specify "*\*.*" in the Exclude files field.

Delete files from an FTP server

To delete files from an FTP server with Advanced Task Scheduler, create a task with FTP delete schedule type.
The task options are very similar to the upload and download schedule types.

Error handling if FTP fails

FTP operations return number of files affected in the LastExitCode value. You can check that value in the IF statement. Please note that if you use Leave existing file option, the left files will not count. The task in the example below displays success or fail message depending on the result on the FTP upload operation.

FTP Task
Click the picture to enlarge.

Categories: Shortcut type, Task scheduler

Leave a Reply

   
About us   Cookie policy   Privacy policy   Terms of use   Link to us