Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 79184 invoked from network); 22 Aug 2006 12:15:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2006 12:15:15 -0000 Received: (qmail 72280 invoked by uid 500); 22 Aug 2006 12:15:10 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 72231 invoked by uid 500); 22 Aug 2006 12:15:09 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 72220 invoked by uid 99); 22 Aug 2006 12:15:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 05:15:09 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jcarls@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 05:15:09 -0700 Received: by py-out-1112.google.com with SMTP id d80so3160935pyd for ; Tue, 22 Aug 2006 05:14:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ripSCZTDrMQXiJWYtahqChSWplCuj77HHrArMcAlux/e05sM32TVfLANjcxTZZ2Mgy12GU6yBJEk6ElH9AReUfMD6FJcCKQZv8PkUJoI50bZdDZhM7ss7qLMV2yX3MN2F2MXA+Fbey8AvAIlAirwRuE/Kd8Qg7zGPAjAL81pZpI= Received: by 10.35.51.19 with SMTP id d19mr9655654pyk; Tue, 22 Aug 2006 05:14:48 -0700 (PDT) Received: by 10.35.17.17 with HTTP; Tue, 22 Aug 2006 05:14:48 -0700 (PDT) Message-ID: Date: Tue, 22 Aug 2006 14:14:48 +0200 From: "Jesper Carlsson" To: commons-user@jakarta.apache.org Subject: =?WINDOWS-1252?Q?Re:[commons-net]_FTP_=96_missing_folder_/_directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Updated and corrected info: When calling FTPClient.listFiles() I get FTPFile[] with length 50. Of this 50 array elements there is one element that is null, and this is where the missing directory should be. I am able to enter the directory with FTPClient.changeWorkingDirectory() (I can do this because I know the name of the directory). My new test code (I call test() from main()): public static void test() { try { FTPClient client = new FTPClient(); client.connect(""); System.out.println("Reply: " + client.getReplyString()); // After connection attempt, you should check the reply code to verify success. if(!FTPReply.isPositiveCompletion(client.getReplyCode())) { throw new IOException("FTP server refused connection."); } client.login("", ""); System.out.println("Reply: " + client.getReplyString()); test2(client, "it"); System.out.println(); test2(client, "itseelmax0018"); System.out.println(); test2(client, "ebccoms01-7.7.0-01"); System.out.println("Status: " + client.getStatus()); } catch (IOException e) { e.printStackTrace(); } } public static void test2(FTPClient client, String dir) throws IOException { boolean changeDir = client.changeWorkingDirectory(dir); System.out.println("Changed to " + dir + ": " + changeDir); System.out.println("ReplyString: " + client.getReplyString()); System.out.println("rs.length: " + client.getReplyStrings().length); FTPFile[] f = client.listFiles(); System.out.println("ReplyString: " + client.getReplyString()); System.out.println("rs.length: " + client.getReplyStrings().length); System.out.println("list.length: " + f.length); for (int i = 0; i < f.length; i++) { System.out.println((f[i] != null ? f[i].getName() : "null")); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org