Pass parameter into WinSCP script

Advertisement

abdalrhman
Joined:
Posts:
1

Pass parameter into WinSCP script

Hi,

I have an SSIS Execute Process Task that uses WinSCP to transfer some files. Below are the values of SSIS Execute Process Task:
Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Argument: /log=T:\Scripts\ScriptGetFile.log /script=T:\Scripts\ScriptGetFile.txt

The password is masked and is stored in the database. I can store the masked password in a variable in SSIS, but I don't know how to pass it the script file ScriptGetFile.txt, below is my script that is in ScriptGetFile.txt. How do I pass the parameter that has the masked password to the script:
# Connect to SFTP server using a password
open sftp://username:password@111.11.11.111/ -hostkey="ssh-rsa 2048 41:e4:10:c8:....................."                     
 
# Upload and delete file
Put  C:\Extracts\Files\OUT\./*.csv /IN/
# Exit WinSCP
exit

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum