Upvote:2

Use NSFileManager to get the name of the files you keep in your specific directory.
Take a look and try the following methods:

  • enumeratorAtPath:
  • contentsOfDirectoryAtPath:error:

Then, applies a comparator to the file names, and store the path of the files matching with your string.

More Answer related to the Same Query

Upvote:0

Use NSMetadataQuery.

File metadata provides several application programming interfaces that allow it application to search for files based on data that is part of the file or file system. The level of interaction your application requires with the search results will often dictate the API that you chose.

http://developer.apple.com/library/mac/#documentation/Carbon/Conceptual/SpotlightQuery/Concepts/Introduction.html#//apple_ref/doc/uid/TP40001841


Credit Goes to: stackoverflow.com

Related question with same questions but different answers