Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File System Task Variable - Help Needed for SSIS Newbie 1

Status
Not open for further replies.

skabutch

IS-IT--Management
Aug 1, 2010
9
0
0
US
As mentioned in a previous post, I am new to SSIS packages and making progress in baby steps. I have been successful at using control flow and data flow to pull in a generic test file. However, in reality I will need to import any tab delimited file (regardless of file name) that resides in a specific folder. As an example, lets say the file or files I wish to import are located in a folder located at c:\import and that I have multiple files in this folder with a *.txt extension.

My understanding is that I will need begin my Control Flow procedure using a File System task with a variable. However, after reviewing the help screens I am still a little sketchy on how to set up this variable. Any advice would be much appreciated.

Thank you!
 
Darg a for each loop over and use a File System enumerator, int the file name put the name of the files you wish to loop through. Lets say that in the import folder you had:

myfile1
myfile2
myfile3
yourfile1
yourfile2
yourfile3

Assuming all these had .txt extensions we could loop through these by setting our file enumerator to c:\import\myfile*.txt.


Typically, I will then using a File System tsk to rename the files as I loop through them.
 
Mike,
Thanks so much for your insightful reply. I do have one follow-up question. How and where do I bring in the File System Enumerator and where do I set file enumerator value?

Thank you.
 
Mike,
Please don't bother with my previous post, I figured out where the file enumerator goes - in the Foreach Loop Editor>Collection.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top