Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get directory listing into arraylist

Status
Not open for further replies.

themeaty

Technical User
Apr 29, 2005
10
US
Hello, any suggestions how I can get the filenames from a directory into an ArrayList? I'm not sure how to do this. Thanks!

-meaty
 
It's pretty simple - use the System.IO.Directory class. It has a GetFiles() method which returns an array of the file names in the directory. You can create a new ArrayList right from that array.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top