Visicom Media Softwares order company francais
 
Your current settings may prevent you from accessing all the features of this site (err. 1). Please see our site requirements.
 

Home/ Products/ AceFTP Pro/ Support/

Downloads
Free trial version
Updates
Order
Upgrade
Feedback
We are eager to hear from you. Send us your comments and suggestions >
Product Highlights
AceHTML 6 Pro
AceHTML 6 Pro is a highly effective tool that allows you to build and manage professional Web sites with ease, control, and efficiency.
Learn more
Banners
Share your satisfaction with AceFTP software by telling your visitors.
Place a banner on your Web page.
Partner Sites
- Web Templates
- Turnkey Websites
- Royalty Free Stock Photos
 
Tutorial: Have AceFTP work for you with the Scheduler

 Introduction
Sometimes you need to perform file transfers on a regular basis, such as in doing a backup or in taking data from a server. These transfers often have to be performed on a regular basis, such as on the first of the month, on each Monday, etc., day or night. And that can cause problems if you forget to do them or if you have to go to bed late when your transfer is due to be done at night.

The solution is to ask AceFTP to do the transfer automatically for you. You then just need to leave your computer on, and AceFTP will do the transfer at the chosen moment.

AceFTP then works for you while you do other things.

 Basic elements

The automation is accomplished through a script that AceFTP follows after it connects to the right site. The script is simply a series of instructions that reproduce what you would do if you connected manually.

The script kicks in after the connection has been established, with the default directories activated as you might have defined them in the site profile.

The script keywords are basically standard English words, so it's easy to program and read.


 Creation of a script

We could define the script in the new task creation process of the Scheduler, but we'll do it independantly to clearly distinguish between the two.

As mentioned, the script takes control after the connection to the site has been established, so you have to define a script within a site profile. This has many advantages, including greatly simplifying the script language structure. The biggest advantages, though, are that the script doesn't need any connection instructions and you don't have to re-enter your server address, username, and password.

Let's define a script that will perform two transfers–one upload, one download. It will first download all HTML files from a Web site (so you get a local copy of files that could have been modified by others) and then change the remote directory (folder) and upload a file named backup.zip, which could be a backup of important files from your home computer.

Select a site where you can find at least one file with the extension *.html and where you can create a directory named backup (where the script will place the Zip file). After selecting the site, go to that site's properties. Go to the Scripts section, and you'll see the following window:

The first step is to uncheck the box at the top of the window so that the fields will be active and you can define a script for the site. Then, in the Properties subsection, give a name to your script. Here, we will name it file transfers. Now we have to actually create the script.

Let's assume the default directories defined in the site profile are those we want to use. We will begin by transferring the HTML files from the server to your computer.

Click on the Add button at the bottom of the window, then select Transfer and click Copy To Left. CopyToLeft() command sould be added in the Script field.

Type *.html within the parenthesis: CopyToLeft(*.html). This will take charge of the transfer of the HTML files from your server to your computer.

Now, let's take care of the second part–uploading backup.zip to the server in a directory named backup. We must first change the active remote directory. Go to the Add/Right menu and select Set Working Folder. This will generate the ChangeToFolderR() command in the Scripts field. Use backup as the parameter: ChangeToFolderR(backup). That will place us in the right folder for the upload.

Then go to the Add/Transfer menu and ask for a file transfer to the right. In the CopyToRight() command that appears, add backup.zip as the parameter: CopyToRight(backup.zip).

To fully save your script, click at the top Add button and on the bottom Apply button. Here's what your window should look like:

You can then exit the site profile window. Next we'll schedule the script's execution.


 Task scheduling

Now that the script has been defined, we need to set the time when it will execute. Go to the Schedule Manager in AceFTP's menu bar:
This will launch the Scheduled Tasks window. Double-click on the icon to create a new task. The Scheduled Task Wizard will then guide you through the creation of the new task.

Click on the Next button to start the definition of the new task. Give a name to that task. We'll name this one file transfers. Then click on the Next button.

In the Action section, you must choose which script to execute. Since the script is defined within a site profile, you must first identify the site associated with that script. Click on the ... button to find the site profile file (it will be the site name with an .ftp extension). The file transfers script should be automatically selected since that's the only script defined for that site profile. If you had defined more scripts, you could choose among them using the scroll-down menu or create a brand new script using the ... button. Click on the Next button.

In the Trigger Type section, you must indicate the frequency of execution of this script. Let's choose the weekly option and click on the Next button.

Below is the Trigger Details section where you define additional details concerning when the script will be executed. Let's ask it to run at 15:00 (3 p.m.) every week on Mondays. Then click on the Next button to get the following confirmation screen:

Click on the Finish button to create the task. You'll then see the task as well as the scheduled dates for execution (in yellow in the calendar shown at the bottom) in the Scheduled Tasks window.

To be sure everything works fine, click on the green button in the Scheduled Tasks window to launch the task right away. Then confirm that all the transfers were done properly.

Once you're sure everything works right, you can forget about it. As long as your computer is turned on, AceFTP will perform this task at the scheduled times.