I am retrieving a list of files from a particular location on an FTP server and then i need to check if a particular filename is in it. if the file dosent exist, i want to provide an alternate filename to check.
FTPFile[] ftpFiles = ftp.listFiles(pdfBean.getFileLocation());
String fileName = pdfBean.getFileName().tostring();
How can i check if filename exists in ftpFiles?