2

I am looking for a macOS equivalent of the Windows command:

type:NOT"file folder" 

This command, when entered into Windows Explorer search bar, will display all the files of a directory or hard drive, without showing the folders in the search results.

Thanks.

1

You can set up some quite complex searches using Cmd ⌘ F in the Finder, rather than invoking Spotlight itself.

enter image description here

You can define many criteria & even save as a smart search for future use.

If you really want to get in-depth, you can use Spotlight's own query language, though the mechanics of that are well beyond my pay-grade.
I'll let Macworld - macOS: How to use Spotlight’s query language to create an All My Files-like feature - explain in detail.

2
  • Thank you for taking the time to reply. Unfortunately this is a path I have been down before, and sadly it does not answer the question above. We are looking for a macOS equivalent of the Windows query command type:NOT"file folder", which can be typed into the search box of whatever directory we are viewing, so that we can see all the files within that directory, and within it's subfolders, without any folders actually being displayed in the search results. – Ghost Aug 2 '20 at 11:17
  • There isn't one, afaik. macOS is not Windows & very rarely behaves like it ;) Spotlight, especially, is very much a consumer-level tool. – Tetsujin Aug 2 '20 at 11:19
1

The Spotlight query you need to use the "kind" attribute. The search term you want is:

"search term" NOT kind:folder

For example, I tested this looking for an eBook titled Mastering OpenVPN. Here are the results of the two searches:

Kind Keywords for Spotlight Search

Spotlight Kind Search Terms

I don't recall where I obtained this list; I just have it saved in my notes as plain text. I formatted it as an image for this site because there was no facility to create a table here on Ask Different

1
  • 1
    This is really cool. I didn’t know that this type of search was possible. Thanks for the keyword list, its really helpful! 😊 – Doug Masters Aug 31 '20 at 22:24

You must log in to answer this question.

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