Two Laptop Bag*
The moose likes I/O and Streams and the fly likes Search MP3 files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Search MP3 files" Watch "Search MP3 files" New topic
Author

Search MP3 files

Udaya Wijenayake
Ranch Hand

Joined: May 15, 2009
Posts: 30
How do i search all the mp3 files in the local disk using a Java program ?


SCJP 1.5
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
What do you mean by "search"? In other words, what do you hope to find - just the file names, or the contents of ID3 tags as well? Or something else entirely?
Udaya Wijenayake
Ranch Hand

Joined: May 15, 2009
Posts: 30
If i give a song name or any other information to the program, it should search the local disk and find the location of the song that match the ID3 content with the given information.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
It is possible using Java, although probably not the best approach. See the OtherOpenSourceProjectsFaq for libraries that can extract ID3 tags from MP3s.
Udaya Wijenayake
Ranch Hand

Joined: May 15, 2009
Posts: 30
Yes. I have the J ID3 library and it supports for extract the ID3 tag information. But what i want to know is how i go through the directory structure and locates the mp3 files?
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Searching for "directory walker java" or some such will find example code that traverses through a directory hierarchy. MP3 files generally have an ".mp3" extension, so it's easy to spot them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Search MP3 files
 
Similar Threads
search files
Search
what api to edit ID3 tags of .mp3 files?
An app. which search the Microsoft Windows Netwrok
Search certain file types