Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Foreach File In Folder Loop - Traverse subfolders

$
0
0

Hello all,

My SOP for importing files/designing SSIS packages is:

  • have a DELETE subfolder in each clients folder to house all the files to be imported.
  • have the SSIS package create an Imported subfolder in theDELETE folder
  • Import each file
  • Move each file into ...DELETE\Imported after import

Until now, I have not had a need to traverse subfolders.

With this current client, my folder/subfolder structure is:

  • ...DELETE\Bank1
  • ...DELETE\Bank2
  • ...DELETE\Bank3

My first thought was to check Traverse subfolders, create theImported subfolder as usual, then create the 3 subfolders inImported and move files into appropriate subfolder...so:

  • files from ...DELETE\Bank1 would move to ...DELETE\Imported\Bank1
  • files from ...DELETE\Bank2 to ...DELETE\Imported\Bank2
  • files from ...DELETE\Bank3 to ...DELETE\Imported\Bank3

My question is...will my Foreach File In Folder Loop take a snapshot of existing folders when started and import only from those folders, ignoring any new folders/files created during run time...or will myForeach File In Folder Loop try to import files in newly created folders as well (try to re-import files that have been moved into ...DELETE\Imported\Bank(1 or2 or 3))?

Thanks for any help anyone can provide (including a better way of handling this process),

CTB


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>