Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS 2008 - Sending file with dynamic name using FTP task

$
0
0

Hi  - Thanks for taking a look -  (I'm very new to SSIS.)

I'm trying to create an SSIS 2008 package that does the following:

1) Execute a stored procedure on SQL.

2) Download the results as a CSV file to a 'local' location.  The file name is set using a variable ("User::LocalFilePath") dynamically based on the current time:

@[User::LocalFilePath] + "GreatReportName_" + "_" +(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) + "_" + Right("0" + (DT_STR,4,1252) DatePart("hh",getdate()),2) +  "_" + Right("0" + (DT_STR,4,1252) DatePart("mi",getdate()),2)+ "_" +  Right("0" + (DT_STR,4,1252) DatePart("ss",getdate()),2) + ".csv"

3) Transfer the CSV file to an FTP site.

4) Delete the CSV file from the 'local' location.

I've been able to do steps 1 and 2 so far.  However when trying the move the newly created file to the FTP site I get the error:

"Error: 0xC002917C at Send to FTP, FTP Task: The variable "User::LocalFilePath" doesn't contain file path(s)."

(When I set the "IsLocalPathVariable" to "False" and use a file previously created the file is correctly transferred to the FTP site.  This proves that the FTP details are correct and that the "RemotePathVariabe" is working correctly.)

I have set the variable ("User::LocalFilePath") to "EvaluateAsExpression" in the variable properties.

Can anyone help?

Many Thanks,

UnoT


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>