Hello,
I'm using a bat file to set up four vars, and pass them to the ftp script.
I try to print all 6 params (exe, script, and four vars) but only the first two appear
here is the bat file:
Here is the content of the ftp script
Result:
only the first two params have a value, the others are empty.
What is the correct way to do this?
Thanks
I'm using a bat file to set up four vars, and pass them to the ftp script.
I try to print all 6 params (exe, script, and four vars) but only the first two appear
here is the bat file:
set WebServer="11.11.11.11"
set TrgMachine="my machine"
set MyUser="myuser"
set MyPassword="mypassword"
set TheScript="D:\MyScript.ftp"
set TheExe = "C:\Program Files\ScriptFtp\ScriptFTP.exe"
%TheExe% %TheScript% %WebServer% %TrgMachine% %MyUser% %MyPassword%
Here is the content of the ftp script
Code: Select all
$param1 = GETPARAM(1)
$param2 = GETPARAM(2)
$param3 = GETPARAM(3)
$param4 = GETPARAM(4)
$param5 = GETPARAM(5)
$param6 = GETPARAM(6)
PRINT("Param1=".$param1)
PRINT("Param2=".$param2)
PRINT("Param3=".$param3)
PRINT("Param4=".$param4)
PRINT("Param5=".$param5)
PRINT("Param6=".$param6)
Result:
only the first two params have a value, the others are empty.
What is the correct way to do this?
Thanks
Still hoping for an answer, hopefully it is simple...
Thanks
Thanks
Hi Kygre,
My apologies for replying a bit late. It wasn't so simple
I tried your batch file and got the same results: ScriptFTP seems to not receive all the parameters. I debugged ScriptFTP and realized that Windows (in this case cmd.exe, the thing that runs the bat files) wasn't passing to ScriptFTP every parameter... nothing to do from the ScriptFTP side. After googling a bit I have found a workaround:
My apologies for replying a bit late. It wasn't so simple
I tried your batch file and got the same results: ScriptFTP seems to not receive all the parameters. I debugged ScriptFTP and realized that Windows (in this case cmd.exe, the thing that runs the bat files) wasn't passing to ScriptFTP every parameter... nothing to do from the ScriptFTP side. After googling a bit I have found a workaround:
set WebServer="11.11.11.11"
set TrgMachine="my machine"
set MyUser="myuser"
set MyPassword="mypassword"
set TheScript="D:\MyScript.ftp"
"C:\Program Files\ScriptFtp\ScriptFTP.exe" %TheScript% %WebServer% %TrgMachine% %MyUser% %MyPassword%
liked Script FTP? Try our other product Email Parser