Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to create a smart-search for my R-files, including both files ending in ".r" and ".rmd". Obviously, files can't end in both.

This yields only files that satisfy both criteria
entering both endings into the search box

This yields no files because the criteria are mutually exclusive.
adding another search-option via the plus-button

How can I search for files ending in either .r or .rmd and more generally how can I specify "or"-searches/ disjunctions? Using "or" or "||" didn't do the trick.

share|improve this question
Can't test this right now, but will the field accept a list, i.e. Can you put multiple extensions into that first textbox, separated with a comma, or something? – Dan J Nov 5 '12 at 18:55
@Dan No success with that either. – Ruben Nov 6 '12 at 11:21

Operands must be written in capitals, so they are understood as such. Therefore, using OR instead of or, will do exactly what you want.

share|improve this answer
No, it doesn't. The "OR" operator works when I'm using plain search terms (i.e. searching file names and contents), but not when the OR is between two blue boxes or in a blue box or in the search bar field "Name ends with". – Ruben Nov 6 '12 at 11:22
@Ruben But you can use, in this case, .r OR .rmd and it will work. – Thecafremo Nov 6 '12 at 11:30
No, it doesn't work. Do I need to show you proof? ;-) That gives me .rdata,.rdb,.rdx files too, and it does a content-search. I could use all kinds of exclusionary criteria now, but that's annoying and not future-proof. – Ruben Nov 6 '12 at 11:44
@Ruben For the Content-Search, you are right. Try this ".r" OR ".rmd", though. – Thecafremo Nov 6 '12 at 12:01
That does in fact narrow it down although it still yields .rdata files. It is apparently possible to get the blue "in file name" box to interpret quot. marks, the outer quot. marks are then omitted and they also work in "File name matches" as bar, but not in "ends with". Still, problem not solved, because I'd have to exclude all the extraneous hits by specifying them. – Ruben Nov 6 '12 at 15:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.