By the way, as Oleg pointed out in post #3 above, you can also use the gateway to fetch files in subdirectories. For example...

Code:
	<int-ftp:outbound-gateway id="gatewayLS" cache-sessions="false"
		session-factory="ftpSessionFactory"
		request-channel="inbound"
		command="ls"
		command-options=""
		expression="'a/*/*'"
		reply-channel="toSplitter"/>

	<int:channel id="toSplitter" />

	<int:splitter id="splitter" input-channel="toSplitter" output-channel="toGet"/>

	<int-ftp:outbound-gateway id="gatewayGET" cache-sessions="false"
		local-directory="localdir"
		session-factory="ftpSessionFactory"
		request-channel="toGet"
		reply-channel="toRemoveChannel"
		command="get"
		command-options="-P"
		expression="payload.filename"/>
...fetches all files in all subdirectories of directory "a".