The Artima Developer Community
Sponsored Link

Java Answers Forum
Filesearcher

1 reply on 1 page. Most recent reply: Jan 27, 2003 11:56 AM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Jim van de Berg

Posts: 1
Nickname: jimmy
Registered: Jan, 2003

Filesearcher Posted: Jan 26, 2003 11:27 AM
Reply to this message Reply
Advertisement
Hello!!

I want to create a program, in which I can enter a directory location and one or more extensions, and where
the result will show all the files in the specified directory with the specified extension(s).
I want to run this via a GUI or via the command-line (e.g. "java programname -ext <file> <path>")
Does anyone know how I can accomplish this easyly via Java. Is there a method within Java for this kind of directory and file look-ups?

Thanks!!
Jim van de Berg


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Filesearcher Posted: Jan 27, 2003 11:56 AM
Reply to this message Reply
It is a snap to create a class that implements FilenameFilter. You can then use it with file.listFiles() or with FileDialog.setFilenameFilter().

Flat View: This topic has 1 reply on 1 page
Topic: A new site for Java Certification Previous Topic   Next Topic Topic: hashtable and hashmap

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use