4 Replies Latest reply on Jan 7, 2005 5:25 PM by jschellSomeoneStoleMyAlias

    FTP LIST Directory Name with Withespace


      I am using org.apache.commons.net package to receive files by FTP.

      I want to list a specific directory inside ftp server but I have the following problem :

      I can list directory with name like "abc"

      but I can't list directory with name like "ab c d"

      Here is the code that I am using :
                files = ftp.listFiles("\\ab c d\\");
                System.out.println("LENGHT : "+files.length);
                for (int i=0;i<files.length;i++)
                     System.out.println(i+" TEST : "+files);
      files.length ==0 when I use directory name like "ab c d"

      I have used also files = ftp.listFiles("\"\\ab c d\\\"");

      but without success.
      Thanks a lot in advance.