cancel
Showing results for 
Search instead for 
Did you mean: 

Advise on complex scenario. Correlation based on file name

Former Member
0 Kudos

I need to process all *.xml files in a folder, but I should only process a specific .xml file if I find another one .ctl with the same name.

That is. I may have 3 .xml files in a folder (a.xml, b.xml and c.xml), but as I have only one .ctl in the same folder (b.ctl), I should only process b.xml and do something with it.

I've been struggling to find out a possible way to solve this scenario. I think it's only possible using NFS with the option of "additional files", but I have to use FTP, and it doesn't have that option.

Of course I could implement it using a java module adapter in the sender comm channel for *.ctl files which establishes the ftp connection for the other file (.xml), but I'm trying to avoid this.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Hopefully this blog will solve your problem..(you have to set your parameter as per your need)

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

Sorry Jorge, I misunderstood your question.. above blog will not help in your case..

Update:-

How about writing a script which will scan the source folder and check if there is a file with .ctl extension then it will move the same name file with extension .xml into some other folder and then you can configure your adapter with this second directory path to simply pick the files.

Edited by: Sarvesh Singh on Feb 12, 2010 2:07 AM

Former Member
0 Kudos

I'm afraid my scenario can't be accomplished in a "standard" way. Thanks anyway for the hint Sarvesh.

Answers (0)