Passing External Values Into Command Scripts |
Top Previous Next |
Robo-FTP permits arguments defined on a Shortcut Target line to be passed in at load time to be used as script file variables. Up to nine arguments are supported. There are nine internally defined variables, %1 through %9, dedicated for this purpose.
Important This is no longer the preferred syntax. In new projects please use the -p command line switch for passing values into script files.
On the Shortcut Target line, an argument is delimited by either & or % character. The following are example arguments:
&argument& %different argument%
The first argument, reading left to right, is assigned to a variable named %1, the second argument is assigned to %2, and so on. For example, consider the following Shortcut Target command line.
"Robo-FTP.exe" &"My Connection"& &SENDFILE "newdata"&
With such a Shortcut Target line, the following script file:
DASHBOARDMSG "Connecting" DIALNET %1 DASHBOARDMSG "Executing task: [" + %2 + "]" PERFORM %2 DASHBOARDMSG "Done"
... would be executed as if it was originally written as:
DASHBOARDMSG "Connecting" DIALNET "My Connection" DASHBOARDMSG 'Executing task: [SENDFILE "newdata"]' SENDFILE "newdata" DASHBOARDMSG "Done" DISCONNECT EXIT
Related command(s): CALL, CHAIN See also: Script File Variables, Launching Robo-FTP with Command Line Switches
|