Determine latest file from SFTP server using java jsch -
is there way determine name of latest file on unix server using java jsch?
i want copy latest file server local machine. have working code that. i'm not able identify latest file. folder contains many files in below format:- report dd/mm/yyyy hh:ss
i tried code mentioned in this post isn't picking latest file. code never seems stop executing.
any appreciated.
according post referred this post
there code line says filter xml file have changed check file format
list = main.chansftp.ls("*.xml");
also there sleep method called on executing thread 1 minute
thread.sleep(60000);
so expect code run atleast minute
this might help
Comments
Post a Comment