Using Winscp to download file from SFTP in SSIS

Advertisement

nbhanot
Joined:
Posts:
1
Location:
india

Using Winscp to download file from SFTP in SSIS

Hi Techies,

I am trying to implement solution in SSIS in which we have to download files from SFTP using Winzip.
Filenames in SFTP are like ABC_CNT_03_06_2019_02-05_AM.csv . Requirement is download the current date file. In that case we have to ignore the Time part in the file name.

Currently i am trying to implement the below solution:
1. Created a variable (User::Filename) in ssis to create the file name ABC_CNT_03_06_2018*.csv
2. In Execute process task : have selected C:\Program Files (x86)\WinSCP\WinSCP.com in executable
3. Arguments : /script="F:\Upload.txt /parameter " + User::Filename
4. upload.txt have the below text

option batch on
option confirm off
open username: password@sftp2.ftpname.com
get /%1% F:\downloadfolder
close exit

Trying to run the package but it is not working.
Can you please suggest further.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,103
Location:
Prague, Czechia

Re: Using Winscp to download file from SFTP in SSIS

Sorry, but "it is not working" is not working as a problem description.
See https://winscp.net/eng/docs/troubleshooting#scripting

Btw, WinSCP can download files with the current date in their file name on its own. No need to generate the name externally.
See https://winscp.net/eng/docs/scripting#timestamp
There's somewhat similar (although not exactly same) example here:
https://winscp.net/eng/docs/script_download_timestamped_filename

Reply with quote

Advertisement

You can post new topics in this forum