I'm agree with you and i think that it's sound like a bug but it seems to depend on the FTP's server implementation. The solution i took to solve this problem is : To list a directory, it's easier to CWD in this directory and then LIST files than LISTing files directly for this directory. What do you think ?
On 5/30/06, Daniel F. Savarese <[EMAIL PROTECTED]> wrote:
In message <[EMAIL PROTECTED]>, "s[e] th & h[o]lth" writes: >I meet a problem when using FTPClient.listFiles(String pathname) with a >space-char inside pathname. >I looked at the problem and i saw that many ftp clients implements this >function like : >CWD target_dir >LIST >instead of >LIST target_dir I don't think this is a bug. I believe the ability to list path names containing spaces is a function of the server, not the client. For example, I tested your approach against an NcFTPd server and it didn't work. In fact, I couldn't list files containing spaces without using a glob expression. Yet, on a server that reports itself as "Microsoft FTP Service" (e.g., ftp.dell.com), I had no problem listing path names containing spaces using the unmodified FTPClient. daniel -#-#-#-#-| Sleep and The Traveller |-#-#-#-#-#-#-#- http://www.savarese.org/ In distant lands, I hear the call of my home. # s a v a r e s e Yet my work is not done. My journey's just begun.- software research -- http://www.sleepandthetraveller.com/ # http://www.savarese.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
