Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.3k views
in Java FTP by (360 points)
I'm trying to retrieve some files from a remote FTPS - explicit server, but when I connect with other tools I see different filenames than when I do a "dir()" command on the SSLFTPClient. The file names are in a strange format (I can't give the actual file names, but here is something similar):

,TRX_BGCONFTP,somefilename.txt,U,20100414T89018994032.bin

This is the filename I see and what gets saved using a product called "Core FTP". However when I use edtFTPj, this is the filename I see when I do a "dir()" command:

20100414T89018994032

I can do a "get" on that filename snippet and it will pull the file down, which is even more odd.

Can anyone comment on this behavior?

Thanks,
- Aaron

6 Answers

0 votes
by (162k points)
That is rather odd. Have you tried dirDetails() rather than dir()?
0 votes
by (360 points)
That is rather odd. Have you tried dirDetails() rather than dir()?


When I try dirDetails (with either the directory name, or by switching to the directory and passing in "./") I get a timeout.....
dir() returns in a second with the truncated (I think??) filenames...
0 votes
by (162k points)
Try switching to the dir and passing in an empty string
0 votes
by (360 points)
Ok when I change to the directory where the files are and then pass in a empty string I get one FTPFile object back. But there is more than 1 file in that directory (more like 20+ files). Also the "getName()" is returning a value like this:

08 17:17:21 ,TRX_BGCONFTP,somefilename.txt,U,20100414T89018994032.bin

I don't know why the extra stuff is at the beginning of that string.

Also I found out the product they are using is called:

BTrade - TDNgine: http://www.btrade.com/site/tdngine.htm

If I could at least get all the FTPFile objects, then I guess I could parse out the string I needed from the name to do a get request..
0 votes
by (360 points)
Ok when I change to the directory where the files are and then pass in a empty string I get one FTPFile object back. But there is more than 1 file in that directory (more like 20+ files). Also the "getName()" is returning a value like this:


Scratch that, they moved some files around on me. I'm getting the correct number of FTPFiles back. So I can do a substring on what is returned by "getName()" and that should get me going, however it seems like this is a lot of work to just list some files and pull them down... :(
0 votes
by (162k points)
Sounds like it has an unusual listing format. That's why getName() isn't working correctly - it failed to parse the listing.

Categories

...