SSIS Dynamic File (Create and Send Email)
Ok changing my question a bit. I need to Create a Variable, store the string (C:\VS\SSIS\Test.txt in that variable and then use that variable to Create the file name and attach and send it.
September 28th, 2011 8:48pm

Create two variables Filepath and FileName , assign folder path like C:\ to variable Filepath and then assign your dynamic file name Test_mmddyyyy_hhmm.txt to variable FileName. Then Open expressions for Send Mail Task and set FileAttachments property like shown below. @[User::FilePath]+ @[User::FileName] Thanks http://dwhanalytics.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 9:19pm

This is same as http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/6a87e293-e051-4727-a06c-376bf583a9c4 You have duplicate entries, please remove this one
September 28th, 2011 9:19pm

How do I store FileName+mmddyyyy_hhmm in the file name variable
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 9:36pm

Sure il remove that
September 28th, 2011 9:36pm

In your variable properties set EvaluateExpression as true and then use the following expression. "FileName" + "_" + RIGHT("00" + (DT_WSTR, 50) MONTH(getdate()) , 2) + RIGHT("00" + (DT_WSTR, 50) DAY(getdate()) , 2) + (DT_WSTR, 50) YEAR(getdate()) + "_" + RIGHT("00"+ (DT_WSTR, 50) DATEPART("hh",getdate()),2) + RIGHT("00" + (DT_WSTR, 50) DATEPART("mm",getdate()),2)
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2011 9:53pm

Assign path C:\VS\SSIS\ to variable FilePath Debu already suggested, set EvaluateAsExpression=TRUE and assign below to variable FileName "Test" + "_" + RIGHT("00" + (DT_WSTR, 50) MONTH(getdate()) , 2) + RIGHT("00" + (DT_WSTR, 50) DAY(getdate()) , 2) + (DT_WSTR, 50) YEAR(getdate()) + "_" + RIGHT("00"+ (DT_WSTR, 50) DATEPART("hh",getdate()),2) + RIGHT("00" + (DT_WSTR, 50) DATEPART("mm",getdate()),2)+".txt" Finally, Open expressions for Send Mail Task and set FileAttachments property like shown below. @[User::FilePath]+ @[User::FileName] Thanks http://dwhanalytics.wordpress.com/
September 28th, 2011 10:49pm

Have a look at my blog post on this: http://beyondrelational.com/blogs/sudeep/archive/2009/11/19/dynamic-file-connection-in-ssis.aspxMy Blog | Ask Me
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2011 7:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics