Beyond FTP Script Examples
Overview
Distributions are scripted
movements of files between different servers in your enterprise. You
might ask, can’t I do that with my existing tools? Probably, in the
same sense as you COULD build a castle with hand tools. But to do so can
be tedious and time consuming – and you wouldn’t get many castles
built.
Script files can increase the speed,
accuracy, and consistency of repetitive tasks that require the movement
of files. New applications, impractical with existing tools, become easy
to implement.
What is a Script?
Distribution scripts are structured text files
containing special words, or key words that perform functions to
complete file transfer tasks. These scripts can be scheduled to
automatically be run on a periodic basis, or on an ad hoc basis as
needed.
Distributing from a Central Site
Suppose you are the network
administrator for a chain of retail stores. Normally your stores access
a central database for pricing information. However, if your network
goes down, the stores will revert to accessing a local database for this
information. It is important to keep this local information current.
Beyond FTP offers a straightforward and easy way to implement a
solution. The following script will do it.
:Comment:#
# Comments follow a pound sign
:Repeat_Time: Daily
:Time: 2300
# Automatically run this script nightly at 11 p.m.
:ServerList: Stores
Troy
Novi
Toledo
Brighton
:EndList:
# The list Stores is defined to be the four Beyond FTP Servers named
# The TCP/IP addresses of these are maintained separately
:Instructions: Freshen
# If the file in the target location is older, then copy updated file.
:From: C:\database\Price.mdb
:To: {!stores}C:\localdb\Price.mdb
# Copy the Price database from the central location to the four store
locations
# using Freshen instruction
Collecting from Remote Sites
If your chain of retail stores maintain
local inventories on their in-store system, you can use Beyond FTP to
nightly collect this inventory information to your headquarters, so you
can consolidate the data and make decisions about reallocating stock
between stores. You could add the following statements to the end of the
script shown above to accomplish this collection.
:From: {!Stores}C:\localdb\inv.mdb
:To: C:\storeinv\%RN\inv%M2%DM.mdb
# Copy the inv database from each store and store centrally using
# wildcard file naming
Using this wildcard file / directory
naming allows you to collect files with a common name from multiple
locations, and store the resulting files centrally in an organized
fashion. In this example, the April 21st copy of the inventory file from
the Troy store would be stored centrally as c:\storeinv\troy\inv0421.mdb.
Advanced Capabilities of Beyond FTP Scripting
The examples shown above illustrate a few of
the basic features of scripting including:
- Automatic execution of scripts on a
specified schedule.
- Performing like tasks to multiple locations
with a single specification.
- Using wildcard file and directory naming to
organize files collected from multiple remote locations.
- Using "intelligence" in the
transfer of files as shown by the Freshen instruction. Allows you to
not waste bandwidth with redundant copies.
- Beyond FTP scripting provides additional
advanced features to allow you to address more complex requirements,
including:
- Automatically retrying failed transfers
based on predetermined criteria.
- Synchronizing transfer tasks. This
synchronization mechanism allows scripts to be automatically halted
upon specified failure conditions. If your requirement is to have
all locations using the same version of a file, Synchronization
allows you to design a script to insure this consistency.
- Control of the level of concurrency in the
movement of files with Beyond FTP. This lets you optimize use of
processing power and bandwidth.
- Automatic archiving allows you to save
existing copies of files before they are replaced. If the new
versions of the file are unsatisfactory, the prior versions of the
file can be automatically reinstated.
- To learn more about Beyond FTP scripts and
the scripting language click here.
Painless Script Writing
Beyond FTP scripts are written using the
Beyond FTP Script Designer. This tool quickly steps you through
the process of creating scripts – without lengthy training. If you
understand your business application, Beyond FTP scripting allows you to
put straightforward solutions in place today.
Example Scripts
|