5

I can't figure this out. How can I use mdfind on OS X to find all photos with creation date between say March 10th, 2008 and March 15th, 2008?

using mdfind 'kMDItemFSCreationDate = 2008-03-10 12:30:56 +1100' is too specific and I don't know how to simplify and broaden the search.

2
  • Melchior, are you talking about spotlight on Mac or iPhone/iPad? Please reply with @JohnRamos so I can further help you.
    – owlswipe
    Jul 26, 2016 at 13:15
  • @JohnRamos Hi John. I edited the original question with more detail. It relates to mdfind on OS X. thanks
    – jakethedog
    Jul 26, 2016 at 13:22

1 Answer 1

3

To simplify and broaden the search you may use operands like >, <, >=, <= or line up several attribute values with &&.

To solve the above mentioned example you can use two different creation times and an item kind:

mdfind 'kMDItemFSCreationDate < $time.iso(2008-03-15T23:59:59) && kMDItemFSCreationDate > $time.iso(2008-03-10T00:00:00) && kMDItemKind = *image'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .