cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the FILE COUNT from File directory

Former Member
0 Kudos

Hello,

i have to develop a scenario like, get the file count from source file directory and validate whether the file count is 5 or not. if 5 files exist i need to process those 5 files to DB tables. if file count is not equal to 5 then i need to send a mail to customer that files are missed at source directory. (subject as files were missed at source directory and in content i need to display the file names exist at source file directory. So that missed file will be generated by the customer based on this mail).

Could you please let me know how to get the count of files from source file directory. if it is possible only with UDF please provide the Java code

Best Regards,

SARAN

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi SARAN,

If you use advance file selection of file, i guess for each file there will be a seperate instance.That means seperate message ID's.So without BPM it is not possible to link them.

I guess you have to go for BPOM

In BPM receive all the files and check the count . I guess u can use 5 recive step for all the files and u can do a check to all the container and based on that u can further process it.

bhavesh_kantilal
Active Contributor
0 Kudos

Do these files have some fixed names?

Can you try to use the option Advanced Selection For Source File to make XI pick all 5 files in one shot?

Check this blog on the same -

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter

If this is not a option - BPM sounds the only possible way.

Regards,

Bhavesh