aspose file tools
The moose likes Java in General and the fly likes getting files in a directory Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "getting files in a directory" Watch "getting files in a directory" New topic
Author

getting files in a directory

Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
How would I get all the files in a directory? Equivalent to doing a dir *.* ... ?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Look into java.io.File list method. You may want to write a java.io.FilenameFilter to select the files you want out of the directory.
Let us know if those are enough clues to go on, or if you'd like some samples.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
Yah I found it, I was looking for the wrong type of object at first, then I peeked in the File definition and found everything I needed
 
 
subject: getting files in a directory
 
Threads others viewed
Using j2ee packages
Help!!!!!
Tomcat installation
reading files in specific directory
Dreamweaver pop up menu behavior
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com