File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "File Listing" Watch "File Listing" New topic

File Listing

Leon Gelbak

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
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!!

Jim Yingst

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

Joined: Aug 26, 2000
Posts: 10065
In case you do want to do it in JSP, check this link:
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Here is a short easy example

GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: File Listing
It's not a secret anymore!