Author |
Message
|
sankarD |
Posted: Wed Jul 25, 2012 11:50 pm Post subject: Read Input files from dif folders using fileinput node |
|
|
Newbie
Joined: 24 Nov 2010 Posts: 7
|
Any idea like how we read the files from different folders in message broker 7
We have requirement like this, Message flow has to read the files from dif folders
c:\fileinput\abc\*.txt
c:\fileinput\xyz\*.txt
The main motive of this approach is today we have two subsequent folders under c:\fileinput , In future if we want to add one more folder under c:\fileinput instead of changing the message flow just we will add the new folder .
know that we shouldn't suppose to use wild characters under file input node input dir. Any suggestions will be really appreciated. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 26, 2012 2:36 am Post subject: Re: Read Input files from dif folders using fileinput node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sankarD wrote: |
We have requirement like this, Message flow has to read the files from dif folders |
If that's the technical requirement, what's the actual requirement. If the text files are identical in format (which they must be because you're processing them with the same flow) why are they in different directories?
sankarD wrote: |
know that we shouldn't suppose to use wild characters under file input node input dir. |
Try it. See if the flow deploys.
sankarD wrote: |
Any suggestions will be really appreciated. |
Put the files in the same directory. Seriously. It sounds like you're adding complexity to your file system because politically "abc" is so self important it won't share a directory with "xyz". _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 26, 2012 2:40 am Post subject: Re: Read Input files from dif folders using fileinput node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sankarD wrote: |
Any suggestions will be really appreciated. |
Or -
Point your main flow's input node at c:\fileinput\real\*.txt
Create a pattern that has a FileInput node with a parameterized input directory and a FileOutput node that points to c:\fileinput\real\
Use the pattern to create 2 flows, one for abc, one for xyz.
When you create another folder, use the pattern to generate another flow leaving the original, more complex, flow intact and hence with no need for testing.
Simple.
You could of course obtain the same result with a *.bat script on a schedule but where's the fun in it....? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqmatt |
Posted: Thu Jul 26, 2012 3:56 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Also consider an upgrade to V8; the ability to scan multiple subdirectories with a single FileInput node was a new feature in that release. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 26, 2012 8:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqmatt wrote: |
Also consider an upgrade to V8; the ability to scan multiple subdirectories with a single FileInput node was a new feature in that release. |
Oooo...................  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|