Whoa, this thread has a high wheel reinvention index. The way to list filenames conforming to a certain pattern is to instantiate a java.io.FileFilter (or FilenameFilter) and stick it in File.listFiles() and friends.
Unfortunately there's no wildcard-pattern-matching filter implementation, but it's not that hard to roll your own. Especially not if you use
Oro or JDK 1.4 regexp.
In a Swing GUI, you'd use a JFileChooser in combination with a javax.swing.filechooser.FileFilter (G-d only knows why this is an object, and why Sun had to invent three slightly different ways to do one and the same thing in the first place).
- Peter
[This message has been edited by Peter den Haan (edited November 08, 2001).]