Ledge

Getting a webloc link out of a dragged file

A webloc is one of those macOS file types that most people have created by accident and never named. Drag a page’s address out of the address bar onto the desktop and a small file appears with the page title and a spring icon. Double-click it later and the page opens. That file is a webloc, and once you know what it is, it turns into a handy way to keep a link somewhere a file belongs.

What a webloc actually is

A webloc is a bookmark saved as a file. Instead of living inside a browser’s bookmark list, it sits in Finder like any document, with a name you can rename and a location you can choose. Inside, it holds one thing: a URL. macOS reads that URL when you open the file and hands it to your default browser.

Because it is a real file, a webloc goes wherever files go. You can drop one into a folder next to the invoice and the contract it relates to. You can attach it to an email. You can put it in a shared folder so a colleague gets the same link without you pasting it into a message. It behaves like a paper note that says “the thing you want is here,” except double-clicking follows the note for you.

There are two close cousins worth knowing. A webloc points at a web address, the kind that starts with http. A fileloc points at a file or folder on disk. They look almost identical in Finder, and both are just a saved location wrapped in a file. For most day-to-day use, webloc is the one you will meet, because it is what you get whenever you drag a link somewhere.

How to make one on purpose

The quickest way is to drag. Grab the small icon at the left of a browser’s address bar, or select a link on a page, and drag it to the desktop or into a Finder window. Let go, and you have a webloc named after the page. Rename it to something you will recognise later, because the default name is often the full page title and can be long.

You can also drag a link out of other places. A URL in Notes, a link in Mail, an address highlighted in a text editor: many apps let you drag the link itself, and the result on the desktop is a webloc. This is useful when you are reading and want to set aside a reference without switching to a browser and fumbling with bookmarks.

There is a limit worth stating plainly. Not every app hands out a proper link when you drag from it. Some give you plain text that happens to be a URL, which lands as a text clipping rather than a webloc. If that happens, you can still open the clipping and copy the address, but it is not the tidy double-clickable file you wanted. The behaviour depends on the app you are dragging from, not on the folder you are dropping into.

When a plain link should become a file

The frustration usually shows up in the gap between apps. You have a link in one place and you want it saved as a file in another, and the drag either refuses or drops the wrong thing. You end up copying the address, opening Finder, making a new text file, pasting, and renaming. For a single link that is tolerable. For a handful gathered while researching, it is tedious enough that you stop bothering and lose the links instead.

The clean version of this is a hand-off that changes shape depending on where the thing is going. A link is not really a file or a piece of text; it is an address, and different destinations want it in different forms. A browser wants to open it. A folder wants a webloc sitting on disk. A chat message wants the raw URL as text. A note wants the same URL, also as text, but inline. The same address, four shapes.

Letting the notch do the reshaping

This is the part Ledge is built around. You drag a link up toward the notch at the top of the screen and let go; it lands on a shelf that drops down and stays there. It sits with anything else you have gathered, from any app, until you know where it belongs.

The interesting bit is the drop. When you drag that link off the shelf into a Finder window, Ledge writes a webloc file for you, the double-clickable kind, named and ready to keep. Drag the same link onto a terminal and it hands over the raw address as text instead, because that is what a terminal can use. Drop it into a chat message and it pastes the URL. You are throwing one link at the notch each time, and each destination receives the form it can actually accept, without you converting anything by hand.

That removes the copy-paste-rename loop entirely for the common case. A link you found while reading becomes a webloc in the project folder in one drag, and the same link becomes plain text in a message a moment later, with no thought about formats.

A small routine that saves the links you lose

The practical habit is to stop treating links as things you must deal with the instant you find them. While you read, drag each useful link to the notch. It waits there. When you are done, drag them off in a batch: the ones that belong in a project folder become weblocs, the one you want to share becomes text in a message, the one you want open right now goes to the browser.

Weblocs were always a quiet feature of the Mac, easy to create and easy to forget. Once you see them as portable, file-shaped bookmarks, they earn a place in the folders where your real work lives, and the notch gives you a calm way to turn a dragged link into exactly that.