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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:38:05+00:00 2026-05-23T11:38:05+00:00

We have a slew of SSIS packages that process files in a specified root

  • 0

We have a slew of SSIS packages that process files in a specified root “Data” folder location and load it to a specified destination database.

Naturally, the root input folder changes across the development and production environments as does the destination database.

For specific input files, we may have a subfolder off of the root Data folder but the file directory structure in Development matches production; only the root folder location is different.

I can easily have a single DtsConfig file to control the database conection by changing the contents of this file depending on whether the file in Development or a production Environment.

The key part:
However, the ConnectionStrings for the files are not as straight forward. ideally, I would like to be able to specify a file Connectionstring path in the form of %RootFolder%\SourceSystemA\HardCodeFileName.txt where %Rootfolder% varies depending on the environment.

However, short of writing script to modify the package at run time (I haven’t seen any examples) or creating the entire package programmatically, I don’t think that this can be done. Using Environmental variables in this way to be applied to only a portion of a package property does not appear to be supported. (Try it!) Relative paths also don’t seem to be supported (although our files are on a different drive, so this may not have helped.)

Not sure if the “DRY” principal as I understand it is relevant here, but basically, I want to separate those things that are static from those things that change and allow for easy update in ONE place and have it apply everywhere.

How can this be accomplished?

  • 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-23T11:38:06+00:00Added an answer on May 23, 2026 at 11:38 am

    It’s not perfect, but I do have a method of doing this. First, add a variable to the package to hold the root folder name. Next, click on your connection and go to properties (F4). Modify the “Expressions” by clicking the “…” button. Create an expression for the Connection String. For the expression, you can combine your root folder with your specific filename (eg, @[User::RootFolder] + "\SpecificPath\Filename.csv").

    Once you have this set up, then you can use a config file to change the RootFolder package variable, and all the files will then be read/written correctly using it.

    In answer to the title question – SSIS supports DRY in some places, and doesn’t in others. For what you are trying to do, the answer is yes (via Expressions as outlined above).

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

Sidebar

Related Questions

I have a slew of normal inline <a> links that I want to open
I have a database designed to hold card data from various trading card games.
I have a whole slew of database access functions which assume a particular connection
Have a build process that can't be edited and need to pack another war
I'm working on a project that involves a simple web service, and have had
For example, I have created a slew of 'test-my-service' Objects in my Spring config
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
have a table that dynamically generates text boxes in run time. I want to
have different files with same name, in different directories. In these files there are
Have a flash player that pops out into a separate popup browser window. And

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.