tags:

views:

78

answers:

2

Hi,

I have to search mp3 files in all directories. I implement using Spotlight concept, but it searches only in /user/userAccount/Music/Itunes Music. I have stored my songs on Desktop/Songs/*.mp3 and it doesn't search in this directory.

What should i do that my apps will search in all directories.

Thanks. Haresh.

A: 

If Spotlight is not a requirement for you, you can use unix command find. An example command line is:

find ~ -name '*.mp3'

provided that all your mp3 files have .mp3 extention.

From a Cocoa app, you have to wrap it in a NSTask or use a popen() call.

mouviciel
A: 

Hi Friend,

   Thanks for giving answer. I have implemented using SpotLight and now its working fine.