I'm scripting WinSCP, and need to dynamically pass in a FTP username and password, depending on which environment I'm using.
However, the docs say, "WinSCP does not support providing the passphase from command line or by other means allowing automation"
Is there another way?
Have you tried using something like
ftp://user:[email protected]
as the address ?You script can then build this uri depending on you environment.
This example uses sftp but ftp should be similar.
The following is what worked for me
created a file called script.text. Following is the content of script.txt
then from the command prompt executed the following statement
Use
/parameter
and%1%
and%2%
in the script:In
some.script
: