SFTP using spring integration

I have a use case when a user deletes several csv files in a remote directory and then puts the ready.txt file to indicate that the files are ready for use. Our file, when it sees the ready.txt file in the remote directory, should start copying all the files to the local directory, including the ready.txt file, using the sftp file of the incoming channel. Is there a way to make sure that the readt.txt file is the last file to be copied to a local directory?

Because when the files are copied from the remote directory to the local directory, I have another inbound channel adapter that looks for the ready.txt file inside the local directory when the one found initiates my batch process, which depends on all the csv files copied from the remote. The fact is that these files must be executed in ORDER. Copying the ready.txt file for the last time will make sure that I have all the files so that I can start my batch process.

Forgive my English, on the bottom line I want the ready.txt file to be the last one to be copied to my local directory to make sure that all csv files are copied.

thank

Mallikarjun

+1
source share
1

FileListFilter ; filterFiles() . , ready.txt ; , ready.txt .

0

All Articles