Just implement a custom comparator, and declare your file endpoint like this:
<file:inbound-endpoint connector-ref="fileConnector"
path="${path}"
moveToDirectory="${move.path}"
moveToPattern="#[message.inboundProperties['originalFilename']]"
comparator="your.package.comparators.YourComparator"
/>
Note that I've had some classloading problems using custom comparators with file endpoints(at least on 3.3.1 CE), notably this bug.
Let's assume that i have three files (a.txt,b.txt,c.txt), and I'd like to process b.txt first then a.txt and finally, c.txt.
How can I do that?
As for the actual ordering, you need to use some collation to decide the order. This may be simple, or very complicated.