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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:38:17+00:00 2026-06-13T19:38:17+00:00

I have a source from which the files are to be processed. Multiple files

  • 0

I have a source from which the files are to be processed. Multiple files are coming to that loacation at any time randomly (Package should run every 2 hours). I have to process only the new files, i can not delete, move the already processed files from that location. I can only copy the files to Archive location. How can I achieve this ?

  • 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-06-13T19:38:19+00:00Added an answer on June 13, 2026 at 7:38 pm

    You can achieve this using the following steps.

    1. Use the foreach file enumerator for your incoming folder and save
      the filename in “IncomingFile” variable. Configure to select “Name
      and Extension”[In my code I have used that otherwise you need to do
      some modification to the script]
    2. Create tow SSIS variables Like “ArchivePath” as string and
      “IsLoaded” as Boolean[default to false].
    3. Create the SSIS script component and use “IncomingFile” and
      “ArchivePath” as the readonly variable. “IsLoaded” should be the
      ReadandWrite variable.
    4. Write the following code in the script component. If file is already
      exists then it will return true. Otherwise False.

      public void Main()
      {
          var archivePath = Dts.Variables["ArchivePath"].Value.ToString();
          var incomingFile = Dts.Variables["IncomingFile"].Value.ToString();
      
          var fileFullPath = string.Format(@"{0}\{1}",archivePath,incomingFile);
      
          bool isLoaded = File.Exists(fileFullPath);
      
          Dts.Variables["IsLoaded"].Value = isLoaded;
      
          Dts.TaskResult = (int)ScriptResults.Success;
      }
      
    5. Use the Precedence constraint to call the Data flow task and evaluation operation should be “Expression” . Set something as follows in your expression box.

      @IsLoaded==False

    Hope this helps.

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

Sidebar

Related Questions

In my source tree have Java code which is automatically generated from XSD files.
I have a scenario in which i receive files from a source and i
I have been making a program that creates multiple CSV's from another source CSV
On my site, I have a PHP script which takes multiple source files (HTML,CSS,
I have this source code from 2001 that I would like to compile. It
I have a very old project that includes the source from another project directly,
Does anybody have any experience with as3-spod? I downloaded the source code from github
I have a jersey client that is getting JSON from a source that I
I have an application that processes data stored in a number of files from
I have created data sources from my objects in my project, some of which

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.