commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: FtpClient not listing all files/dirs
Date Mon, 26 Sep 2011 22:43:31 GMT
On 26 September 2011 23:32, Lennart Petersson
<lennart.petersson@gmail.com> wrote:
> Thanks for your response!
>
> But it had no effect on my problem (think I've already tested that before
> but did it again).
>
> getSystemType() givs me:
>
> system type:UNIX Type: L8 Version: BSD-44
>
> Also now tested with SYST_L8 with no success.

Try setting the language as well:

conf.setServerLanguageCode("sv"); // Swedish

Alternatively, try setting the month names as follows:

http://commons.apache.org/net/api-3.0.1/org/apache/commons/net/ftp/FTPClientConfig.html#setShortMonthNames%28java.lang.String%29



> /L
>
> 2011/9/27 sebb <sebbaz@gmail.com>
>
>> On 26 September 2011 21:26, Lennart Petersson
>> <lennart.petersson@gmail.com> wrote:
>> > FTP server is on an old AIX.
>> >
>> > Version of commons-net is 3.0.1
>> >
>> > Following are some debug output i have from my simple use of FtpClient.
>> As
>> > you can se when using method ftpClient.listNames() it will list all 13
>> > files/dirs. But when trying ftpClient.listFiles() it will only show 12
>> > files/dirs. The one missing (dir wrk) differs from all the other
>> files/dirs
>> > by have been modified during this year. I've also tried a FTP Client GUI
>> > like Cyberduck and I have the same problem there, it will not show the
>> wrk
>> > dir. If I look into Cyberduck log though I can see wrk:
>> >
>> > drwxr-sr-x  16 sys         4608 sep 21 13.08 wrk
>> >
>> > Look at the separator used in timestamp, a period instead of colon. My
>> guess
>> > is that has something to do with my problem. And I guess that I might be
>> > able to configure FtpClientConfig to deal with this but I'm not able to
>> > figure out how :(
>>
>>
>> http://commons.apache.org/net/api-3.0.1/org/apache/commons/net/ftp/FTPClientConfig.html
>>
>> gives some ideas to try, for example:
>>
>>    FTPClient f=FTPClient();
>>    FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
>>    conf.setRecentDateFormat("MMM d HH.mm");
>>    f.configure(conf);
>>
>> It would be useful to know what the server returns for getSystemType().
>>
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> Listing
>> > 13 file names with listNames()
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) got
>> file
>> > list: 13
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> v5
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> bi
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > wrk
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > avisur
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > PROGRESSanst.prn
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > anstalld
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > nyanst
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > uttag.p
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > sttest.fil
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > tillf
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > klinikenheter.txt
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > namn
>> > 2011-09-26 20:06:15,151 INFO  [se.rplp.test.FtpClient] (HDScanner) Name =
>> > wwrk
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> Listing
>> > 12 files with listFiles()
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system   6757020 mar 11 2008  anstalld
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system         0 aug 09 2002  avisur
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:drwxr-sr-x  38 sys      sys         1024 feb 04 2009  bi
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r-----   1 root     system     32384 mar 04 2008
>>  klinikenheter.txt
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system         5 maj 25 2009  namn
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system   1492870 mar 04 2008  nyanst
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r-----   1 root     system   1157638 mar 04 2008
>>  PROGRESSanst.prn
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system        17 mar 11 2008  sttest.fil
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:drwxr-xr-x   2 root     system       512 apr 09 2008  tillf
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system      3106 mar 11 2008  uttag.p
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:drwxr-sr-x  38 sys      sys         1024 nov 11 2010  v5
>> > 2011-09-26 20:06:15,182 INFO  [se.rplp.test.FtpClient] (HDScanner)
>> > File:-rw-r--r--   1 root     system    118167 maj 25 2010  wwrk
>> >
>> > Any help would be very much appreciated!
>> >
>> > Thanks,
>> >
>> > /L
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message