Thanks Scott,

Our EnsLib.HL7.Service.FTPService uses the FilePath setting in the Source information which does not account for the sub directory searching option:

OnProcessInput() line:

Set tIOStream.Name=pFTPStream.Attributes("Filename")_$C(13,10)_"via FTP "_..Adapter.FTPServer_":"_..Adapter.FTPPort_" path '"_..Adapter.FilePath_"'"
 

But the adapter is passing the actual path where the file was retrieved from in pFTPStream.Attributes("FTPDir") . I will make the change in EnsLib.HL7.Service.FTPService to use  pFTPStream.Attributes("FTPDir") instead of ..Adapter.FilePath but I am afraid I cannot advise on which release this will be in.

To verify from terminal using  write  ##class(EnsLib.HL7.Message).%OpenId(<id>).Source

returns before the code change:

somefile.hl7
via FTP 192.168.224.100:2121 path '/hl7'

to

somefile.hl7
via FTP 192.168.224.100:2121 path '/hl7/1/yellow/'

Would this be sufficient for your needs or since you state the reasons are more complicated  a more elegant solution in the Ensemble service is needed.

Kind regards

James