Step-by-step Script Example

The script example demonstrates the different ways of entering script commands.  The final script will check a directory for files.  If files are present, it will copy those files to a second directory.  When the copies are complete it will delete the files that have been transferred.  There is actually a template, PollDirectory, which performs this job using variables.  As you will see, we must continually browse to retrieve the various source and destination directories.  The template allows you to browse one time, assigns that result to a variable, and then uses the variable in the remainder of the script.  It is a useful exercise to study the template once you have the tutorial script running.

Begin by launching the Script Editor and creating a new script.