Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


pass parameter into WinSCP script


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 paramert that has the masked password to the script:

# Connect to SFTP server using a password
open sftp://username:password@ -hostkey="ssh-rsa 2048 41:e4:10:c8:....................."

# Upload and delete file
Put C:\Extracts\Files\OUT\./*.csv /IN/
# Exit WinSCP