March 6, 2009 at 7:26 am
How to do following
1. Poll a directory which will content 1 file or 2 files
c:\input\ ----- contains any filename 1.txt , 3.txt
2. rename one by one to fixname.
c:\input\1.txt to c:\input\data.txt
move file c:\one\data.txt
rename second c:\input\2.txt to c:\input\data.txt
move file c:\two\data.txt
March 6, 2009 at 8:45 am
Have you looked into the Filesystem Task? It should be able to accomplish each task you mentioned.
Tim Mitchell, Microsoft Data Platform MVP
Data Warehouse and ETL Consultant
TimMitchell.net | @Tim_Mitchell | Tyleris.com
ETL Best Practices
March 6, 2009 at 1:49 pm
I would use the for each loop container,
http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
then write a .NET script to parse out the filename.
I would then do a conversion of the file "number" into a string and use that as a variable to set the path name. Here is another example:
Hope this helps to steer you in the correct direction. 🙂
Argue for your limitations, and sure enough they're yours (Richard Bach, Illusions)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply