Enter search queries below or use the tag links to the right to browse the knowledge base by category (Show All Tags).
How do I pass variables into Robo-FTP from a shortcut or command line?
There are two methods of passing variables to the script.
Passing variables using the -pX arg switch
Use of the -p switch is the preferred method to pass external arguments into Robo-FTP from a shortcut or the Windows Command Prompt command line. The value x must be the single digit 1-9. Therefore, up to nine arguments may be passed this way and are assigned to internally defined script file variables %1 through %9. The single space between x and arg is required.
The advantage to this method over the legacy method is that Windows environment variables (e.g., %SystemDrive%, %USERNAME%, etc.) as well as user defined strings may be passed into Robo-FTP.
C:\program files\robo-ftp.exe -p1 mystring -p2 %SystemDrive%
Enclose user defined strings with embedded spaces in quotation marks. You cannot mix multiple environment variables and/or environment variables and user strings in the same argument. Use of this method and the legacy method on the same command line is not recommended.
Passing variables with the && or %% delimiters (legacy method)
Alternatively to the newer -p switch, arguments delimited by & or % are assigned to internally defined script file variables %1 through %9. There can be up to nine script file variables assigned in this way. Script file variable arguments must follow the last switch passed into Robo-FTP as shown below.
C:\program files\robo-ftp.exe -n -sscript.s %var1% %var2%
With delimited variables, both of these formats are allowed:
&sub-parm&
%sub-parm%
Article last updated: 2021-11-18
Tags: Robo-FTP, Command Line