I am unable to get the exact file list using FTPClient. Sample code as below :
FTPClient client = new FTPClient();
client.connect("x.x.x.x");
client.login("abcd", "abcd");
FTPFile[] ftpFiles = client.listFiles();
for (FTPFile ftpFile : ftpFiles) {
System.out.println("FTPFile: " + ftpFile.getName());
}
I tried to set to PASV mode using enterLocalPassiveMode()/enterRemotePassiveMode()/pasv(). But, it doesnt work.
Please also check Apache Commons FTPClient.listFiles ..
Thank you