How to pickup files from Inbound Directory

Hi

I am new to webMethods so ingore if i say something stupid :rolleyes: …I have created a flat file schema and validated it then I created the whole flow service to process that flat file which went fine too, now I have a problem…suppose I have 100s of files in the inbound directory and I need to pick each of them and process 'em. How would I do this, earlier when I created the flow I mentioned that specific path for that file in the getfile function which was hard coded but how would I go if I have more than one file…
Any help is appreciated…

Have you looked at using the file polling facility provided by IS?

if you are using v6 or higher, check the documentation for flatfile port.

if you are using v4.x, let us know and I will post the “how-to” for that version.

Ok priyanka I am just assuming that you are using the 6.x version of the IS and you said that you are new so I will tell you how to do it in detail :

*Go to your IS Admin page and click on “Ports” under the “Settings” tab.
*Click on add a port->choose the “webMethods/FilePolling” and hit the button below.
*Now you will see the File Polling Listener Configuration Page.
Fill out the information which are necessary like the package name, Service which you wanna process,Monitoring Directory,Working Directory ,Completion Directory, File Polling Interval etc…and as you mentioned you are using the Flat file make sure you write “application/xwmflatfile” in content type.

If you need more information of every field there you can refer the documentation. And in case you are using 4.x IS ask saurabhm but that should give you the idea of how to do it in 4.x IS…

HTH

Talha

If your 100s of files are spread over 100s of dirs then consider
writing a service that builds a string list of all the dirs that have files.
Add the add this service to your flow and loop over the string list.

Thanks Talha for going through wit th procedure, it is working like a charm,thanks alot and thanks you ajohns49 for you information too… I really appreciate your help guys…

Glad it is working…