I have a script that takes parameters. Is there a way to pass parameters to the script in the interactive environment?
In the textbox labelled "Script file", I tried
and I get the error message
The file c:\myscript.ftp "param1" "param2" does not exist or is not accessible
I get around this by hardcoding values in the code, but it becomes a nuisance when there are a lot of parameters.
Thanks,
John
In the textbox labelled "Script file", I tried
Code: Select all
c:\myscript.ftp "param1" "param2"
and I get the error message
The file c:\myscript.ftp "param1" "param2" does not exist or is not accessible
I get around this by hardcoding values in the code, but it becomes a nuisance when there are a lot of parameters.
Thanks,
John
Hi John,
Yes, there is a way. And actually it is almost the way you thought it was. You just need to add ScriptFTP.exe or ScriptFTP_console.exe:
Note that the exe files are usually under C:\Program Files(x86) \ScriptFTP
Then, in the script, you can retrieve the value of the parameters with the GETPARAM command
More info (and examples) here:
https://www.scriptftp.com/d/ftp-miscellaneous-commands/getparam
Yes, there is a way. And actually it is almost the way you thought it was. You just need to add ScriptFTP.exe or ScriptFTP_console.exe:
Code: Select all
ScriptFTP.exe the_script.ftp "the param 1" 1234321
Note that the exe files are usually under C:\Program Files(x86) \ScriptFTP
Then, in the script, you can retrieve the value of the parameters with the GETPARAM command
More info (and examples) here:
https://www.scriptftp.com/d/ftp-miscellaneous-commands/getparam
liked Script FTP? Try our other product Email Parser