File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes List of Files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "List of Files" Watch "List of Files" New topic
Author

List of Files

Shane Roylance
Ranch Hand

Joined: Aug 29, 2001
Posts: 72
Hi all,
Is it possible to get a list of files with a certain extension in the current working directory. I was thinking I could use JFileChooser in some way without the GUI, but I couldn't figure it out
Any help would be greatly appreciated
Shane
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
Look in the File API. There is a method list() or listFiles() that takes a filename filter as an argument.
HTH,


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>
Shane Roylance
Ranch Hand

Joined: Aug 29, 2001
Posts: 72
Thank you, this is how I got it to work:
 
 
subject: List of Files
 
Threads others viewed
Problem in using Hibernate with struts 2.1.2 tiles
Scanning directories in java
how to read and list files in Jsp List
readme.txt
what this implies is it file server or public folder
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture