Ledge

How to drag a file straight out of Spotlight on a Mac

Spotlight results are not only for opening. Press Command-Space, type part of the file’s name, then press on the result and drag it out of the Spotlight panel to wherever it needs to go: a Finder folder, an app in the Dock, an email you are writing, or a Terminal window. You skip opening Finder to find a file you have already found.

Two things are worth knowing before you make it a habit. Dropping on a Finder folder moves the file rather than copying it, and Spotlight works on one result at a time.

The basic drag

  1. Press Command-Space and type a few letters of the file name.
  2. Use the arrow keys to highlight the right result. In most versions of macOS the panel shows a preview, so you can confirm it is the file you mean.
  3. Press on the result, hold, and drag it out of the Spotlight panel.
  4. Let go over the destination.

Spotlight’s look has changed more than once across macOS versions, but dragging a file result has kept working. If the drag does not start, make sure you pressed on a file and not on a suggestion such as a web search, a definition or a calculation, none of which are files.

Check where the file lives first

Spotlight finds files by name and, for many kinds of file, by what is inside them, so it is easy to grab the wrong notes.txt or an older copy of a report. Before you drag:

  • Hold Command with the result highlighted. In many versions of macOS this shows the file’s location at the bottom of the preview.
  • Press Command-Return to reveal the file in Finder instead. Its folder opens with the file selected, which is the surest check of all.
  • Press Return only if you want to open the file; that is Spotlight’s default action.

If two results share a name, the folder is usually what tells them apart.

What happens when you drop

A file dragged out of Spotlight behaves like one dragged out of a Finder window: the place you drop it decides what happens.

  • A Finder folder or the Desktop on the same disk: the file moves there and is no longer in its old folder.
  • A folder on another disk: the file is copied, and the original stays put.
  • An app window, such as a mail message or a document: the app takes a copy to attach or insert, and the original stays put.
  • An app icon in the Dock: the file opens in that app, if the app accepts that kind of file.
  • A Terminal window: the file’s path is typed in as text.

The surprise is the first one. Dragging a file from Spotlight to the Desktop “to have it handy” pulls it out of its project folder. Hold Option as you drop if you want a copy instead. Copy, move, or alias when you drag a file on a Mac has the full set of rules, and how to give a terminal a file path instead of the file explains the terminal case.

Where Spotlight falls short

Spotlight is built to be quick, so it shows a short list with only a few results for each kind of item. That is fine when the name is distinctive and frustrating when it is not. Three limits come up often:

  • One file at a time. You cannot select several results and drag them together.
  • Excluded folders never appear. Anything you have listed under Spotlight’s privacy settings in System Settings is left out of results, by design.
  • Some matches are content matches. A file can appear because a word inside it matched, which is useful but can crowd out the file you meant.

When you need more than a quick grab, press Option-Command-Space to open a Finder search window instead. The results there are ordinary Finder items: you can switch to list view, select several with Command-click, and drag them together. Turn on View > Show Path Bar and the bottom of the window shows where the selected result lives.

Gathering a few files by searching

A common job is pulling together files you know by name but not by location: a contract, last quarter’s report, a logo, a screenshot from last week. With Spotlight alone, each file needs somewhere to go the moment you drag it.

Ledge gives each one a place to wait. Search, drag the result up to the notch at the top of the screen, and let go; it lands on a shelf that drops from the notch and stays there until you take it somewhere. Spotlight already sits in the upper part of the screen, so the notch is a short drag away. Search for the next file and do the same. When you have everything, open the shelf with Option-Space or a click on the notch and drag each item to where it belongs.

Each destination gets what it can use. A Finder folder gets the file itself, which moves it; a chat app uploads it; a terminal gets the path as text. On a Mac without a notch, the shelf sits at the top center of the screen. Ledge has no account and no cloud, and files never leave the Mac. How to gather files from different folders in one spot covers other ways to collect a set like this.

Questions

Can I drag a folder out of Spotlight?

Yes. Folders appear as results like files do, and dragging one works the same way, including the rule that dropping it on a Finder folder on the same disk moves it, along with everything inside.

Do I need a Finder window open for this?

No. Finder runs in the background all the time, but you do not need any of its windows. Spotlight and the place you are dropping onto are enough.

Why does Spotlight not show the file I know is there?

Usually because its folder is excluded from Spotlight, the file is on a drive that is not connected, or the index is still catching up after a large copy. Try the Finder search window with Option-Command-Space; if it finds nothing either, the file is not where Spotlight can see it.