This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
The File class API should have everything you need to do that, specifically returning an array of Strings containing the names of all the files in a directory. You can also test to see if it is a directory or a file. Jason
There are two specific methods for listing the files in a directory. They are both in the class File. list() and listFiles() list() returns an array of Strings. listFiles() returns an array of File objects. There are also flavors of these two that incorporate filters for filenames.
------------------ Jason R. Kretzer Software Engineer
Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>