Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
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)

Options

Topic review

martin

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
nbhanot

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.