September 25, 2013 at 9:26 am
I have a file that comes from a vendor who can't seem to spell. The file has a Prefix of D,E, or P. 95% of the time they put the 'D' ( or others) at the beginning of the file names so in my ForLoop.Collection.Files: box I have d*.txt, but every now and then, some muckity-muck puts the prefix on the end instead and the gates of heck come crashing down.
I want to test the file name somehow, or maybe put an -OR- in that Files: box. Any ideas?
Bueller?
Thanks in advance.
Crusty.
September 26, 2013 at 8:48 am
Bueller?
Bump.....
September 26, 2013 at 8:55 am
Who is Bueller?
Why don't you put the file in its own folder, then you don't need to worry about the file name - just look for any file in that folder? If necessary, have a task at the end of the package that moves the file off to a folder called Completed.
John
September 26, 2013 at 9:15 am
Bueller? is a throwback to the OLD movie "Ferris Bueller's Day Off". He played hooky from school. His teacher was a young Ben Stein who famously called "Bueller?" several times during the roll call. It's been copied and entrenched in english lexicon by old farts like me.
back to the topic.
The file IS in it's own folder; however, there are some back ground reasons that go into our architecture as to why it's not reasonable for me to make seperate folders for each possibility. part of that is it's "too complicated for the staffers" that move the files from the source to the destination folders to have to analyze it, and why can't I just "write a query" is another statement I get.
I thought about building another set of imports based on that rule; however, the package is already cluttered due to 3 other formats that I have to deal with and this is a once in a while kind of thing...... actually, I just had an idea... I'm going to do that but wrap everything in sequence containers to "shrink" it up.....
Wow... great idea dude... LOL
September 26, 2013 at 1:09 pm
That idea bombed for a complicated reason I don't feel like explaining... darn.... Essentially, the suffexed the file name with some code that makes no sense to our processing and ends in the same letter as another file search so it mistakenly grabs that file too... causing all kinds of headaches.
September 26, 2013 at 3:42 pm
CptCrusty1 (9/25/2013)
I have a file that comes from a vendor who can't seem to spell. The file has a Prefix of D,E, or P. 95% of the time they put the 'D' ( or others) at the beginning of the file names so in my ForLoop.Collection.Files: box I have d*.txt, but every now and then, some muckity-muck puts the prefix on the end instead and the gates of heck come crashing down.I want to test the file name somehow, or maybe put an -OR- in that Files: box. Any ideas?
Bueller?
Thanks in advance.
Crusty.
Maybe use a .NET script task to test the filename?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
September 26, 2013 at 3:45 pm
Good idea... I"ll pass that on to the .Net folks and see what I get.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy