Ledge

How to drag a folder instead of a file on a Mac

A folder drags exactly like a file: press on it, move, release. Everything inside travels with it, including subfolders, and the structure arrives intact. The part that surprises people is what happens at the other end, because a folder means very different things to Finder, to a chat app, to a terminal and to a web upload field.

What each destination does with a folder

The item you are dragging is the same in every case. The destination decides what to make of it.

  • Finder or the Desktop takes the folder whole. On the same disk that is a move; to another disk it is a copy. Modifier keys still apply, and copy, move, or alias when you drag a file on a Mac covers them.
  • A terminal receives the folder’s path as text, properly escaped if it contains spaces. This is the quickest way to get a cd command pointed at the right place.
  • A chat app usually refuses a folder outright, because there is no single file to upload. Some compress it for you first; most simply do nothing.
  • A mail composer often attaches nothing, for the same reason. If it does accept the folder, it typically zips it.
  • A web upload field depends entirely on the site. Some accept a folder and walk the tree; many take files only.
  • An app icon in the Dock opens the folder in the app if the app understands folders, for example a code editor opening it as a project. Otherwise nothing happens.

The rule underneath all of this: a folder is a container, and anything that needs one concrete file to send cannot use a container. That is not a bug in the app.

Making a folder into something a strict app will take

When the destination refuses a folder, compress it. Right-click the folder in Finder and choose Compress, and you get a single .zip beside it with the same name. That zip is one file, so anything that takes files takes it, and whoever receives it gets your folder structure back when they expand it.

Three things are worth knowing about this:

  1. Compressing does not touch the original folder. You end up with both.
  2. macOS adds some hidden housekeeping files to the archive. They are harmless and invisible to most people opening it, though they occasionally show up for someone on another operating system.
  3. If the folder holds media that is already compressed, such as photos or video, the zip will be close to the original size. Zipping is about making one file, not about saving space.

The alternative when only the contents matter is to open the folder, press Command-A to select everything inside, and drag the selection rather than the folder. That sends the files themselves with no container, which is what a chat app or an upload field usually wants anyway. How to drag files that are not next to each other covers selecting a subset instead of all of it.

Folder drags that behave unexpectedly

Dropping a folder onto a folder with the same name. Finder does not merge by default. It asks whether to replace, and replacing swaps the whole folder rather than blending the contents. If you want to merge, hold Option while dragging and choose Merge when it is offered, or move the contents rather than the container.

Dragging a folder into the sidebar. That does not move it. The sidebar stores a shortcut, and the folder stays where it was. How to drag a file to a Finder sidebar folder goes through the whole sidebar as a target.

Dragging a package. Some things that look like single files are folders underneath, including apps and certain document formats. They travel as one item, which is the behavior you want. Right-click and choose Show Package Contents only if you specifically need to go inside.

A very large folder over a network. The copy starts the moment you release and can run for a long time. Check the pointer badge before letting go, and watch the progress in the Finder window’s toolbar.

Collecting a folder’s worth of things without making a folder

There is a common case that sits between the two: you need to hand over six specific items that live in four different places. Making a folder for them means creating it, moving six files into it, dragging the folder, and later deciding whether to keep the folder at all.

Ledge skips the container. Drag each item you want up to the notch at the top of a MacBook screen, one at a time, from whichever window it happens to be in, and each one lands on a shelf and stays there. When you have all six, open the shelf with Option-Space or by clicking the notch and drag the set out together to wherever it needs to go. On a Mac without a notch the shelf lives at the top center of the screen.

Ledge takes folders as well as files, so you can stage a folder alongside loose files and hand them over in one movement. Because each destination receives the representation it can use, dropping on Finder moves the items, dropping on a terminal hands over the paths as text, and dropping on a chat app uploads the files. Nothing goes to a server at any point; there is no account and no cloud step. How to collect several files before you send them covers the same workflow in more detail.

Questions

Does dragging a folder copy everything inside it?

It moves or copies the whole tree, depending on whether the source and destination are on the same disk. Every file and subfolder inside comes along either way.

Why does a chat app take my file but not my folder?

Upload fields want one file each. A folder has no single stream of bytes to send, so the app declines rather than guessing. Compress the folder first, or select the contents and send those.

Can I drag a folder into a terminal to change directory?

Yes. Type cd and a space, then drag the folder into the window. The path lands as text, already escaped, and pressing Return moves you there.

Is compressing a folder the same as creating an archive on another system?

The zip file Finder makes opens fine on other systems. It carries a few hidden macOS files that some people will see in the listing, which is cosmetic rather than a problem.