Results 1 to 7 of 7
  1. #1
    artemff is offline Member
    Join Date
    Dec 2009
    Posts
    41
    Rep Power
    0

    Question List of files and directories.

    How get list of files and directories?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    listFiles() give you all the files and folders in a particular folder. You have to filter files, isDirectory() is the way. Please read File API for more details.

  4. #4
    artemff is offline Member
    Join Date
    Dec 2009
    Posts
    41
    Rep Power
    0

    Exclamation

    Eranga, Thanks

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  6. #6
    artemff is offline Member
    Join Date
    Dec 2009
    Posts
    41
    Rep Power
    0

    Question

    If you've solve the problem, please mark the thread solved.
    Eranga, how I can do it?

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. how to get the list of war files
    By vijayabaskar in forum Java Servlet
    Replies: 0
    Last Post: 04-03-2009, 09:39 AM
  2. how to list certain files in a given directory in java
    By corpusluteum in forum New To Java
    Replies: 6
    Last Post: 09-24-2008, 01:19 AM
  3. List all the files in the current jar
    By Srikanth_From_Moon in forum New To Java
    Replies: 0
    Last Post: 06-14-2008, 09:42 AM
  4. JSP getting list of directories
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-31-2008, 01:51 PM
  5. How can I get list of files in a directory
    By karma in forum New To Java
    Replies: 2
    Last Post: 12-15-2007, 12:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •