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 6213241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:39:38+00:00 2026-05-24T06:39:38+00:00

How can i change Flat file path using foreach loop container in SSIS I’m

  • 0

How can i change Flat file path using foreach loop container in SSIS

I’m having flat file which is under c:\sourcefile name of the file is “Flat(Date)”
for e.g Flat01aug2011.csv
and every day it is generated by recent date so i need to picked up new file always and pass it to Flat File destination ,
so how can i traverse through folder and take new file which is having recent date.???

  • 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-24T06:39:39+00:00Added an answer on May 24, 2026 at 6:39 am

    Example in the below given link shows how you can loop through files of a given extension and load them into a database using Data Flow Task.

    The example loads .csv files. The package uses a Foreach loop container to loop through the files and there is a Data Flow task within the loop container. The Data Flow task contains a Flat file source which changes based on the file being looped through. This is done by altering the Flat File Connection Manager path.

    How do I move files to an archive folder after the files have been processed?

    Here is an example that loops through a list of directories within a given directory and picks the most recently created folder using Script Task and Foreach loop container. You need to make use of a similar logic to pick the most recently created file.

    How do I pick the most recently created folder using Foreach loop container in SSIS package?

    Hope that helps.

    Update:

    Create two string data type variables namely DirPath and FilePath. Set the value C:\backup\ to the variable DirPath. Do not set any value to the variable FilePath.

    Variables

    Select the variable FilePath and select F4 to view the properties. Set the EvaluateAsExpression property to True and set the Expression property as @[User::DirPath] + "Source" + (DT_STR, 4, 1252) DATEPART("yy" , GETDATE()) + "-" + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("mm" , GETDATE()), 2) + "-" + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("dd" , GETDATE()), 2)

    Expression

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone tell me how i can change the .xml file that a flash
I understand that I can change a sql table using the follow sp: EXEC
I have input data coming from a flat file which has english, japanese, chinese
You can change the connection string at run-time like this. You make the connection
I can change SQL at runtime. Can I do the same with LINQ ?
I can change the irb prompt mode with irb --prompt prompt-mode I can see
I understand how I can change the dns settings for my domains by editing
Where I can change compiler options for C# project in VisualStudio 2008 (without command
I know I can change the selectionStyle of a UITableViewCell to make it highlight
Is there an app that can change the order of images inside an icon?

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.