This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Get a List of all files given a Directory\Volume Name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Get a List of all files given a Directory\Volume Name" Watch "Get a List of all files given a Directory\Volume Name" New topic
Author

Get a List of all files given a Directory\Volume Name

Rob Bass
Ranch Hand

Joined: Aug 28, 2001
Posts: 67
Does anyone know how to do this? I used the File Object but it only retrieves files in the currently directory it does not go into the subdirectories.
Thanks,
Rob
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
To my knowledge, there is no such facility in the jdk1.3. Here is a solution to an exercise which looks very much like what you are looking for:
http://math.hws.edu/javanotes/c11/ex-11-1-answer.html
W.
Rob Bass
Ranch Hand

Joined: Aug 28, 2001
Posts: 67
recursion is the answer. Thanks again.
Rob
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Get a List of all files given a Directory\Volume Name
 
It's not a secret anymore!