How to download file using ftp script task in SSIS?

Gaurav Kumar Singh 0 Reputation points
2023-06-03T13:44:36.4433333+00:00

I want SSIS script task where we can login into mainframe using ftp command and then download it using get command. I have ServerName, UserName, Password, FileName.

Currently I use command prompt to download the file with commands:

  1. Open command prompt
  2. Type -- ftp ServerName
  3. UserName
  4. PassWord
  5. get 'FileName' "C:\temp\file1.csv"

Or a .bat file script also work where we run that bat file and file could be downloaded automatically.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ronen Ariely 15,206 Reputation points
    2023-06-04T23:50:19.0033333+00:00
    0 comments No comments

  2. ZoeHui-MSFT 41,491 Reputation points
    2023-06-05T01:57:34.8133333+00:00

    Hi @Gaurav Singh,

    You may use FTP Task in SSIS to achieve this. And then you may schedule the package to be automatically.

    Check: SSIS - How to Use FTP Task [Download File from FTP Site]

    If you want to use script task, take a look at the examples here.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.