FilenameFilters you can use in your own Java programs with File.list( FilenameFilter f ). They can also be used standalone as fancy dir commands. They come with Java source and include: AllDirectoriesFilter gets all directories AllFilesFilter gets all files ClamFilter simple wildcard DirListFilter .