Hi,

I have the following route below which transfers pdf-files and txt-files
from one directory to different directories at target system. I want to
write the pdf-files to target system before txt-files.
I tried to do this by using sortBy in property file.
Like this:
sftp.inbox=sftp://c...@xxx.xxx.xxx.xxx:22/files?password=secret&sortBy=*.pdf;*.txt

However, it seems that some of the pdf-files is written to target after the
txt-file.
Are there other configurations to use to achieve that txt-files will be
written to target system after all pdf-files?
I'm using Camel 2.8.2.


<route id="inComingInvoiceRoute" routePolicyRef="incomingPolicy" >
        <from uri="{{sftp.inbox}}" />
        <choice>
                <when>
                        <language language="simple">${header.CamelFileNameOnly} 
regex
'^.*pdf$'</language>
                        <to uri="{{file.imagedirectory}}" />
                </when>
                <when>
                        <language language="simple">${header.CamelFileNameOnly} 
regex
'^.*txt$'</language>
                        <to uri="{{file.outbox}}" />
                </when>
                <otherwise>
                        <to uri="{{file.other}}" />
                </otherwise>
        </choice>
</route>


Thanks in advance for any hints. 

Best regards
Lars Stuevold

--
View this message in context: 
http://camel.465427.n5.nabble.com/Writing-to-destination-where-priority-is-based-on-filename-extension-tp5031542p5031542.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to