Pass 2 parameters to WinSCP
I need to run winscp as a process task from SSIS passing in the sftp server connection details and the file to send. I am trying to run this from a command prompt before integrating with SSIS.
To start with I am passing 1 parameter, so I have a batch file (X1A) that contains the line
winscp /command "option batch on" "option confirm off" "open sftp://user:password@server:22" "put %1%" "exit"
Then from command prompt I enter the command x1a file.txt
And it sends the file with no trouble
If I changed the batch file to replace the connection information with %1% and the %1% with %2" so I get this
winscp /command "option batch on" "option confirm off" "open %1%" "put %2%" "exit"
then ran the command x1a "sftp://user:password@server:22" "file.txt"
The command fails and displays
winscp /command "option batch on" "option confirm off" "open "sftp://user:password@server:22"2" "exit"
How do I pass 2 paramaters to winscp?
To start with I am passing 1 parameter, so I have a batch file (X1A) that contains the line
winscp /command "option batch on" "option confirm off" "open sftp://user:password@server:22" "put %1%" "exit"
Then from command prompt I enter the command x1a file.txt
And it sends the file with no trouble
If I changed the batch file to replace the connection information with %1% and the %1% with %2" so I get this
winscp /command "option batch on" "option confirm off" "open %1%" "put %2%" "exit"
then ran the command x1a "sftp://user:password@server:22" "file.txt"
The command fails and displays
winscp /command "option batch on" "option confirm off" "open "sftp://user:password@server:22"2" "exit"
How do I pass 2 paramaters to winscp?