The adapter currently doesn't allow reconfiguration of the default FileListFilter, which is an AcceptOnceFileListFilter - producing the results that you see.
We have an open JIRA issue to allow configuration of this filter. https://jira.springsource.org/browse/INT-2892
In the meantime, you could use the outbound gateway to LS and GET the file(s) instead.
The sample app has some examples; in your case, you'd start the flow with a simple <inbound-channel-adapter/> to generate a request containing the target directory as the payload...
Code:
<int:inbound-channel-adapter id="ftpRequestGenerator" expression="'foo/bar'" channel="inbound" >
<int:poller fixed-rate="1000" />
</int:inbound-channel-adapter>
<int-sftp:outbound-gateway id="gatewayLS"
session-factory="sftpSessionFactory"
request-channel="inbound"
command="ls"
command-options=""
expression="payload"
reply-channel="toSplitter"/>
<int:splitter input-channel="toSplitter" output-channel="toGet"/>
<int-sftp:outbound-gateway id="gatewayGET"
local-directory="/foo"
session-factory="sftpSessionFactory"
request-channel="toGet"
reply-channel="toLaunchBatch"
command="get"
command-options="-P"
expression="payload.remoteDirectory + payload.filename"/>
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware