permaculture playing cards*
The moose likes Java in General and the fly likes get list of folders Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "get list of folders " Watch "get list of folders " New topic
Author

get list of folders

aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
hello all,
i have an application that gets the list of folders in a specific folder and then gets all the files within each folder.

How can I do that please.
thanks alot!
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

The java.io.File class has a list() method and a listFiles() method, either of which can list the contents of a directory. There's also an isDirectory() method to tell you which Files are actually Directories.


[Jess in Action][AskingGoodQuestions]
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get list of folders
 
Similar Threads
Access right on Data Folder
NoSuchMethodError in CMR
stopping a table from collapsing when clicking on image its getting reloaded
Regarding including jar files for directory
Folder's First in JTree