This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes File Listing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "File Listing" Watch "File Listing" New topic
Author

File Listing

Leon Gelbak
Greenhorn

Joined: Jul 15, 2002
Posts: 3
how can I get a filelisting of a particular directory?
what I have so far :
File myDir = new File(sPath);
how can I load the file list of myDir into a Vector or array?
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Igelbak
Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!


Dave
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Thanks for the name change. This doesn't really seem to have anything to do with JSP's, so I'm moving it to Java in General (Beginner).


"I'm not back." - Bill Harding, Twister
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
In case you do want to do it in JSP, check this link: http://www.xmlfirst.com/Wrox/chp7/27770703.htm
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Here is a short easy example


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Listing