We help IT Professionals succeed at work.
Get Started

SSIS: Send dynamically named csv file to FTP server

Last Modified: 2016-02-10
Hi Experts,

I have a package that queries an OLE DB source and creates a CSV file to a folder using a dynamic name like so:
@[User::Dynamic_Filename] + (DT_STR,4,1252) DatePart("yyyy",getdate()) + Right("0" + (DT_STR,4,1252) DatePart("m",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("d",getdate()),2) + ".csv"

Open in new window

Basically, in the flat file connection I created the connection using the code above so that the file is dynamically named with a specified name and the current date.

It looks like there is no way I can send the extract csv straight to FTP . So I'm having to send it to a flat file source in a specified folder.

But it is this same file that I want to send to FTP i.e. with the dynamic date appendage. How can I create another variable to use for the local path so I use the file that was just dynamically created?


Watch Question
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE