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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a File.list filter?

Status
Not open for further replies.

adrianjohnson

Programmer
May 16, 2002
145
GB
I'm trying to list files in a directory using list(), and wondered if there is a way I can filter the list to show files with a certain extension.

(I would Search, but it's under routine maintenance at the moment!)

Thanks for your help,

Adrian Johnson
 
list() method accepts a FileNameFilter parameter or something like that.

That allows you to set a filter for any conditions on the filename, including extensios.

Take a look at java.io.File API.

Cheers,

Dian

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top