Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I get the file's name in a directory on FTP server?  RSS feed

 
z xing
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to use ftpclient.list() , but it is return like this:
-rwxrwxrwx 1 owner group 662 Feb 11 16:42 cas_chrvar.h
-rwxrwxrwx 1 owner group 1329 Feb 11 16:42 compile.com
-rwxrwxrwx 1 owner group 34140 Feb 11 16:42 psc.h
-rwxrwxrwx 1 owner group 13529 Feb 11 16:42 statistic_02_data.pc
how can I get those file's name?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Welcome to JavaRanch!
Get a better FTP library? The format of this listing can vary, so the smarts to parse it should be in the library, not individual applications.
I've never done this personally, though, so perhaps someone else can chime in.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the name of the FTP library you're using now? There are many different classes called FTPClient, from different companies and organizations. And can you show the code you use to list the files?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!