I am able to remotely login, and change directories. I am at the point where I need to get a list of just the files that end with .txt and I only want the names of those files in the array.
I am having a hard time understanding your manual. It looks like I could use listFiles() or getNames(), but there is no hint of how to use the commands to do this function.
The code I have at this point is:
// Get current directory listing
log.info("Getting current directory listing");
FTPFile[] files = ftp.directoryList(".");
for (int i = 0; i < files.length; i++) {
log.info(files[i].toString());
}
This code returns everything about all of the files in the directory.