Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3482050
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:30:53+00:00 2026-05-18T10:30:53+00:00

I’m using Visual Studio 2005 to build a package that will deposit a flat

  • 0

I’m using Visual Studio 2005 to build a package that will deposit a flat file (.txt) into a specified location. The package will run every weekday. Currently, the file that gets deposited is just called summary.txt, and the file is simply overwritten each day for new content. What I’d like to do instead is change the name of the file to summarymmddyyy.txt, and just add a new file to the location everyday with the date of deposit. So, today’s would be summary12062010.txt, tomorrow’s would be summary12072010.txt, etc. Is there a way to do this within an SSIS package? Really, all I’m doing is a simple data flow that does a select statement from a SQL DB source to this flat file – nothing too fancy. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:30:53+00:00Added an answer on May 18, 2026 at 10:30 am

    You can use a variable that is evaluated as an expression to create the file name.

    Add a new SSIS variable to your package. Select the new variable in the Variables window and view properties (press F4). Set the EvaluateAsExpression property to True and enter the following for the Expression property value

    "summary" + RIGHT("0" + (DT_STR, 2, 1252) (DATEPART("mm", GETDATE())), 2) + RIGHT("0" + (DT_STR, 2, 1252) (DATEPART("dd", GETDATE())), 2) + (DT_STR, 4, 1252) (DATEPART("yyyy", GETDATE())) + ".txt"
    

    This expression uses functions to extract the month, day and year values, and includes the values to create the name based on today’s date.

    Select the connection manager for your flat file. View properties (press F4). Select the Expressions property and click the elipsis (…) button. In the Property Expression Editor select the ConnectionString property. And enter the name of your new variable in the following format:

    @[User::MyVariable]
    

    If you need to include the path, create the expression like this:

    "C:\MyFiles\" + @[User::MyVariable]
    

    If you prefer, you can avoid the variable and put the entire expression in the ConnectionString property:

    "C:\MyFiles\" + "summary" + RIGHT("0" + (DT_STR, 2, 1252) (DATEPART("mm", GETDATE())), 2) + RIGHT("0" + (DT_STR, 2, 1252) (DATEPART("dd", GETDATE())), 2) + (DT_STR, 4, 1252) (DATEPART("yyyy", GETDATE())) + ".txt"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I want use html5's new tag to play a wav file (currently only supported
In order to apply a triggered animation to all ToolTip s in my app,
I want to count how many characters a certain string has in PHP, but
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.