cancel
Showing results for 
Search instead for 
Did you mean: 

How to read multiple files from Source Folder?

jagesh_lakdawala
Active Participant
0 Kudos

Hi Experts,

I have Scenario of Sender File Adapter to Receiver Proxy.

Number of Input files on a given source location is unknown and even Input files name is also unknown.

So how should I get this details at runtime?

Please suggest.

Thanks & Regards

Jagesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

in ID in sender file comm channel, use * in source file name.............then all the source files placed in source file directory will be picked by your sender file comm channel in your scenario.

Regards,

Rajeev Gupta

jagesh_lakdawala
Active Participant
0 Kudos

Hi all,

Thanks for your valueable suggestions.

I tried the same using the file name Input*.txt.and Sender CC has read all the files(Input1.txt & Input2.txt).

But in SXMB_MONI, it shows the two different Message. So is it possible to generate single XML message which contains all the Input files data?

Please suggest.

Regards

Jagesh

former_member750652
Contributor
0 Kudos

Hi Jagadeesh,

I think Its not possible to have messages collectively in SXMB_moni.As we set Poll interval .XI would process seperately for every message.In your case Prosessing is being done for each file.

YOu can acehieve that using BPM ,Where in you can collect all your mesages at one go and monitor them in SXMB_MONI_BPE.

Thanks,

Ram.

Former Member
0 Kudos

Hi,

see if you want to process more than one file in a single msg in XI, then you will have to create a BPM process for it and then inside the BPM you can have a loop to collect your multiple files in a single msg.

Regards,

Rajeev Gupta

jagesh_lakdawala
Active Participant
0 Kudos

Hi Rajeev & Ramakrishna,

I also think to use BPM but i have never worked with BPM, can you provide me step by step material for this case to create the BPM?

Thanks to both of you,

Regards

Jagesh

Former Member
0 Kudos

search SDN with query as BPM for collecting idocs blog which explains this process

try to follow the same approach for your scenario also

Rajesh

Answers (2)

Answers (2)

former_member750652
Contributor
0 Kudos

Hi Jagesh,

When we want to process multiple files using file adapter the only option was using NFS and checking additional files option. However if we want to use same functionality using FTP we would face problems.

They are:

1) Only one file would be picked up Even if we use *.xml

2)We cannot mask the files, which we donu2019t want to pick from folder.

In that case follow the following procedure it would would work well for both NFS and FTP more over it could filter the files that you dont want to pick up from source directory.

in communicatin channel:

souce file name = additionalfile.xml (dummy name)

check 'Advanced selection for source file' option.

Directoy name = souce directory.

File name mask = a*.xml (its picks only the files whose name starts with 'a'.

Exclusion mask = b.xml,c.xml (it ignores the files whose name stats with 'b' and 'c').

Check this technique ,Its really help ful to you.

Thanks,

Ram.

Former Member
0 Kudos

Hi,

It will be good if you know the files are in what format. I mean if they are either text or xml because it will help the sender CC to pick the correct files.

If you have only text files at given location then you can use *.txt and if they are xml then use *.xml in your CC for file name.

Regards,

Sarvesh