Programming a Script

Reference:        Script Editor

Script programming is supported by a number of different tools.  There are forms for every individual command.  These forms present the command syntax in a straightforward manner with appropriate supporting edits and capabilities to make the programming easier.  You can get at these forms three ways:  By typing a colon ( : ) as the first character of a line in the script and selecting a command from the displayed list; By selecting the Tools menu and following the appropriate sub-menus to the command; Or by right clicking in the script window and following the sub-menus,  The cursor must be properly positioned before using either menu approach.

In addition, there are forms that allow you to produce lists of certain commands.  These are displayed as part of the List Command Toolbar, which initially appears at the bottom of the main window.  These lists include File Actions, Server Lists, Modifiers, and Requeue statements.

In addition to the forms, there are Script Template that contain pre-programmed script fragments that can be tailored to a particular environment.  These are more than examples.  When you insert a template into your script, it will engage command forms to capture information that is specific to your installation.  When you finish with a template, that portion of your script is programmed.

Simplifying the programming is no substitute for knowing the commands and the manner in which scripts operate.  Many Beyond FTP commands provide for simultaneous operation.  This means that the structure of the script is critical to itís functioning correctly.  Beyond FTP commands are very high level commands.  You never have to deal with FTP commands.  In the typical client a transfer requires logging in, changing directories, performing a get or a put, and logging out.  In Beyond FTP, that entire sequence becomes a single From/To command.  If you complicate the example by transferring files that meet a particular file mask or date restriction, the programming becomes quite involved.  In Beyond FTP, you use the same From/To command.  Finally, if you are performing local file copies, they are completely different from remote file copies.  In Beyond FTP, you use the same From/To  command.  The only difference between an FTP server and a local disk drive is that the former has a Server Name attached to the file specification. 

This level of abstraction makes it easy to create scripts that operate against different FTP servers and/or local or networked drives without knowing a host of different commands.  It also explains why Beyond FTP is a comparatively terse language.  You simply do not need a long list of commands to accomplish your tasks.  The various tasks involved in managing files, running programs, and making decisions is covered by about forty commands.  This is a small enough number, that we encourage you to investigate them all, if only to know what is available. 

See Script Language for information about the command syntax and Alphabetical Command List or Topical Command List for a full listing of all script commands.