ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
I have a WSH script (myWsf.wsf) that builds a string that will be executed:
Code: Select allrun("ScriptFTP_console.exe myFtp.ftp myUsername myPassword",0,True)
The script file, myFtp.ftp, is:

[scriptftp="myFtp.ftp"]PRINT(getparam(3))
PRINT(getparam(4))
OPENHOST("ftp.myhost.com",getparam(3),getparam(4))
EXIT[/ScriptFTP]
getparam(3) will be myUsername, and getparam(4) will be myPassword; pretty simple so far, right.

I want to see whether myWsf.wsf script is correctly passing parameters into the myFtp.ftp. I can debug the WSH, but cannot get drill down to myFtp.ftp. How do I have ScriptFTP show me the values of the parameters?

I tried running ScriptFtp.exe, but it allows only ScriptFtp files (it does not debug myWsf.wsf). Here's the problem: how can I pass parameters to myFtp.ftp from ScriptFtp.exe?

Thanks,

John
How do I have ScriptFTP show me the values of the parameters?
You are doing it right, using PRINT to show what GETPARAM returns. If ScriptFTP does not show anything means that parameters are empty. Just to be sure, try:

[scriptftp="debug.ftp"]PRINT("user is:".GETPARAM(3))
PRINT("password is:".GETPARAM(4))[/ScriptFTP]
I tried running ScriptFtp.exe, but it allows only ScriptFtp files (it does not debug myWsf.wsf)
Of course! ScriptFTP only runs ScriptFTP files :)
Here's the problem: how can I pass parameters to myFtp.ftp from ScriptFtp.exe?
I guess you mean how to pass parameters from myWsf.wsf to ScriptFTP, right?
From ScriptFTP, I want to run myScript.ftp to see the runtime messages. The problem is that the script needs parameters. How can I insert parameters into myScript.ftp using ScriptFTP?

In the Script File drop down list, I tried adding the parameters

Script File c:\tmp\myScript.ftp myUsername myPassword

I get

***** Cannot open script file.
***** c:\tmp\myScript.ftp myUsername myPassword was not found.
Script File c:\tmp\myScript.ftp myUsername myPassword
In command line
%ProgramFiles%\ScriptFTP\ScriptFTP.exe c:\tmp\myScript.ftp myUsername myPassword