Ledge

Handing a file to an app by name on the Mac

Double-clicking a file opens it in whatever app macOS has decided owns that file type. Most of the time that suits you. Then there are the files you want somewhere specific: a PNG you would rather edit than preview, a CSV you want in a code editor instead of a spreadsheet, a screenshot you need to hand straight to a chat window. The default gets in the way, and you spend a few seconds fighting it every time.

There are several ways to open a file with an app of your choosing on a Mac. Each one suits a different moment. Once you know all of them, you can pick a file up and put it exactly where you mean to, instead of letting the system guess.

What the default app really is

macOS keeps a quiet database called Launch Services that maps every file type to an app. When you double-click, it looks up the type, finds the registered owner, and opens the file there. The type is worked out from a Uniform Type Identifier, a label like public.png or public.comma-separated-values-text that sits underneath the file extension you see.

The important part is that the default is a setting, not a law. A .txt file is not owned by one app in some permanent sense. macOS simply picked one, often the last app that claimed the type when you installed it. You are free to override that choice for a single file, or change it for every file of that type, and the file itself never changes at all.

The built-in ways to open a file with an app

Right-click and choose Open With. Control-click or two-finger click the file in Finder, hover Open With, and you get a menu of every app that has told macOS it can handle this type. Hold Option while that menu is open and Open With becomes Always Open With, which sets the default at the same moment. This is the quickest one-off route.

Drag the file onto the app. Drop a file on an app icon in the Dock, or on the app in your Applications folder, and it opens there. If the icon stays dim and refuses the drop, that app has said it cannot read the type. Holding Option and Command while you drag forces the app to try anyway, which is occasionally useful and occasionally a way to open nonsense.

Use the Terminal. The command open -a “App Name” file.ext opens one file in a named app. So open -a “Visual Studio Code” report.csv puts a spreadsheet in front of an editor instead of a spreadsheet app. It is precise, it is scriptable, and it never guesses.

Change the default for good. Select the file, press Command-I for Get Info, expand the Open With section, choose the app, and click Change All. Every file of that type now opens there until you change it back. Reach for this only when you truly always want the same app.

When handing the file to an app is the whole point

The methods above assume you start at the file and decide where it goes. Plenty of the time the reverse is true: you already know the destination, and the file is just passing through on its way there. A screenshot heading for a chat window. An invoice heading for an accounting app. A clip heading for an editor.

That is where a shelf helps. Ledge lets you drag a file up to the notch at the top of the screen and drop it there, where it waits. You can gather a few things from different folders, then hand each one to the app it belongs in. The part that saves the fighting is what Ledge does on the way out. Drop the file on a terminal and it hands over the path as text. Drop it on a chat app and it uploads the actual file. Drop it in a text field and it pastes plain text. You aim the same thing at each app, and each app receives the form it can use, so you are never converting anything by hand.

You decide which apps count as destinations in Settings, so the ones you hand files to most often stay a single drop away even when they are closed.

Making the right destination the easy one

The trick to opening files with the app you mean, rather than the app macOS guessed, is to remove the guesswork. Set a permanent default for the types you always treat the same way. Learn Open With for the exceptions. Keep open -a in your back pocket for anything you run from a script or a note.

For the files that are really in transit from one app to another, the fastest path is often not to open them in the usual sense at all, but to set them down somewhere fixed and hand them off when you are ready. A file has to leave your hand eventually. The only question worth solving is where it lands, and how little effort it takes to get it there. Once opening a file with a chosen app stops being a fight, you notice how much of the day used to go into aiming and re-aiming a mouse at windows that would not hold still.