It has a method called listNames() that returns a String of the files' names in the current directory. The problem is that the site I'm ftping into presents to me a virtual file system, and the files "listed" are not constructed (by servlets?) until I try to download them. On this system, when I ftp in via a command prompt, I must type "dir" at the ftp prompt to get a listing (though the listing is not a typical file system one, seeing as how it includes other things like batch ID, status codes, etc), and then "get" with parameters in order to download the file I want. All of the "file names" are actually identical, and their batch ID numbers are unique (that's what I ask for with that get command). When I call FTPClient's listNames(), whatever it does returns a string that has only the pseudo filename (which is useless to me), and does not obtain any of that other data that I can see when I type dir at the command line.
So, after logging in, I need a way to pretend I'm sitting at an ftp prompt with a command line terminal and can type in "dir" and hit enter. I thought that maybe FTPClient's superclass (FTP) could help me out, because it has a method called sendCommand(String s). However, when I send "dir" and call FTPClient.getReplyString(), the reply string simply says that the dir command was not understood! So I'm not sure what that sendCommand is for, and I can't find any other suitable methods for executing a direct command that does something very explicit rather than going through a black box, and I'm hoping that someone out there understands this API better than me or has a bright idea about how to handle this!