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


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.


Credit Goes to: stackoverflow.com

Related question with same questions but different answers