Script File Variables |
Top Previous Next |
Variable arguments are internally or user defined string or numeric values that may be used in script commands where an alphanumeric or numeric value is expected. Variables may be created and assigned a value by using the SET or SETNUM script commands, or are automatically created and assigned a value by the Robo-FTP script processor when used in certain script commands.
Script variables begin with at least one alphabetic character and may be up to 255 characters in length. Variables are not case-sensitive. For example, $abc and $ABC are the same variable. Up to 4096 variables may be assigned at one time.
Once a variable is assigned, it remains defined for the duration of an active script file or until it is unassigned with the SET command. The values assigned to script variables may be up to 1020 characters in length. Examples of alphanumeric variables are shown below:
SET connection = "Connection 2" DIALNET connection SET file name = "c:\anyfile" DELETE file_name
Robo-FTP script files may perform substring manipulation on variables. The SETLEFT, SETRIGHT, and SETMID commands allow extraction of substrings from the left to right, right to left, and from mid string respectively.
Robo-FTP script files may also perform basic arithmetic manipulation on numeric variables. The INC and DEC commands allow incrementing and decrementing of numeric strings while the SETNUM command permits adding, subtracting, multiplication, and division. Examples of numeric variables are shown below:
SETNUM x = 1 SETNUM e = m x c x c ;; (hint: e = mc2) INC x
There are a number of internal script variables assigned by Robo-FTP to make your script development easier and more powerful. These are described in their own Internal Script Variables section.
See also: Using Shortcut Target Arguments in Script Files
|