Northern Commander

Copying and moving

Copying and moving take what is marked in the active pane — or the row under the cursor — to the folder in the other pane, or anywhere you type. Both ask first, and ask again about anything already there.

KeyAction
F5Copy
F6Move
⌘VPaste
⌥⌘VMove items here

The dialog

F5 and F6 open the same dialog. Its title and its button follow the Action chosen.

The destination starts as the other pane's folder.
3 items to:
What is going — how many, or one file’s name — and under it, where: the other pane’s folder to begin with. It starts selected, so typing replaces it; press an arrow key, Home or End first to add to it instead. Type any folder instead: the folders that fit are offered as you type, and ~ is your home folder. A name alone is a folder beside what is going — for a paste, in the folder pasted into. ⌥↓ lists the last five destinations used, kept from one run to the next.
Action
Copy or Move, so a wrong key does not have to be canceled and pressed again.
Only files, in every subfolder, that
Off to begin with. Ticked, only the files whose names match a pattern are taken — see below.
Copy or Move
Starts it, with a panel to watch it. It is the default, so Enter starts it: nothing has been taken away yet.
Background
Starts it without the panel. The line under the panes shows it instead, and the rows it came from are unmarked at once.
Preview
Shows what it would do before anything is written — see Looking first. It is on the dialog F5 and F6 open, not the one a paste or a drop opens.

What could never work is refused on the dialog, with the reason under the field, before anything is written:

  • There is no folder of that name to copy into
  • A folder cannot be copied into itself — or into a folder inside it.
  • The source and the destination are the same folder — so a file cannot be copied beside itself.

These follow every link along both paths — /tmp is really /private/tmp — so a folder reached by another path is still the same folder, and a move never writes a file over itself.

When the work plainly will not fit on the destination’s disk, the dialog says so in a red line with the room needed and the room free, and its button reads Copy anyway or Move anyway. Going on is never refused, since a disk may compress files or share data between copies, so the work could still fit.

  • When the work was started before its total was known, the same question comes up before anything is written, as Not enough room, with Stop beside the button. Stopping costs nothing.
  • A move within one disk is never checked, since it writes nothing new.

Only the files that match

Tick Only files, in every subfolder, that to copy or move just some of the files — all the photos in a tree of folders, or everything except the backups.

Only the HEIC and JPEG files in the two folders, at every depth, go to the backup.
  • match takes the files that match; don’t match takes the rest.
  • The pattern is read as in the pane’s filter: *.jpg;*.png is either, and what follows | is left out. Search with chooses wildcard or regular expression.
  • It applies at every depth, and to marked files themselves, not only to what is in marked folders.
  • A folder comes along only as far as it holds something taken. One with nothing taken is not made at the destination.
  • A move leaves each folder where it was, holding what was left out. A folder with nothing left out moves whole.
  • For F5 and F6 from a filtered pane, the pattern starts as its filter. It is never ticked for you.
  • Ticked with nothing typed, or with a pattern that cannot be read, the button does nothing.
  • The panel watching it counts the files left out so far. After a move, the journal says what each folder left behind still holds.

When something is already there

A file already at the destination is asked about, one at a time.

Both files' size and last change, side by side. Skip has the focus.
Answer What happens
Retry Looks again — once you have moved or renamed the one in the way yourself
Overwrite Writes over it. The old file stays until the new one is whole
Skip Leaves it, and goes on to the next
Rename and keep both The arriving file takes a new name beside it: IMG_4127 copy.heic, then IMG_4127 copy 2.heic, and so on up to a hundred
  • Apply to all gives the same answer to every later file in this copy. It cannot go with Retry, which is about this file only.
  • Nothing is the default: Enter does nothing until a button has the focus, and the focus starts on Skip. Esc skips this file.
  • Overwrite with Apply to all asks again, in red: Overwrite them all or Go back.
  • Stop ends the whole copy or move instead, after asking, as the panel’s own Stop does.
  • A folder arriving where a folder of the same name is goes into it, without asking. Only the files in the way are asked about.

Looking first

Preview reads both folders and shows what the copy or move would come to. Nothing is written, made, renamed or removed while it looks. Back, or Esc, returns to the dialog.

Four files are in the way. Three are older than the ones arriving; Overwrite older leaves the fourth.
  • The first lines are sentences: how many files and how many bytes in all, how many folders will be made and how many will be merged into a folder of the same name already there, and how much room will be left on the destination’s disk, or how much is missing.
  • N files are already there lists only the files with one in their way. Under The one already there is are two words for each: larger, smaller or same size, and older, newer or same timestamp. A file within two seconds of the one arriving has the same timestamp. A row that is the same in both stays in the list, dimmed. Under the list are the exact size and date of both, for the row chosen.
  • A move within one disk says how many items will be moved as they are, in one step each. Nothing is in their way, so they are not looked inside and what they hold is not counted. A folder going into one of the same name is looked into, and so is everything going to another disk. A destination reached through a link is where the link leads. Where the disks cannot be told apart, the line says so instead, and those are not looked inside either.
  • Other lines count the files a pattern leaves out, the files where a folder of that name is (or the other way round) that cannot go, the folders that could not be read, and the pipes, sockets and devices that stay where they are.

For all of them gives every file in the way one answer, for a copy or move started from here with Start copy or Start move:

Answer What happens
Ask each time Each is asked about when it is reached, as without a preview
Overwrite all Each is written over. Asks again first, in red
Skip all Each is left, and the rest goes
Overwrite older A file is written over only when it is more than two seconds older than the one arriving. One that is newer, of the same timestamp, or has no date is left. Asks again first, in red
  • The line under it says what the answer comes to, and the room left follows it.
  • The answer also goes to a file that turns up in the way after the look, and the question in red says so.
  • A link is weighed and dated as the link, not as what it points at.
  • Background starts it without the panel.
  • What is shown is the disks as they were at the time on the last line. Look again reads them again. The line says so when another copy, move or delete is running.
  • What was written over or left is in the journal, as when it is answered one at a time.

When something cannot be done

A file that cannot be written or read — access denied, no room left on the destination, a name too long for the disk — is asked about in Could not copy, or Could not move, with the file’s name and why.

  • Try again is the default. Skip leaves it; Skip all leaves every later one without asking. Stop ends the whole operation, after asking. Esc skips.
  • There is no overwrite here, since none would help.
  • A file where a folder of that name is, or a folder where a file is, comes here rather than to the question above: overwriting would mean deleting the one in the way.
  • A folder that cannot be read is asked about the same way; Try again reads it again.
  • A folder already there that you may not write into — often an earlier copy of a read-only folder — is asked about first: photos is read-only. Copy into it anyway?, with Yes, All, Skip and Cancel, as a delete asks. Yes makes it writable until the copy is done, then read-only again. Skip leaves it, and nothing goes into it.
  • Moving into such a folder is asked about the same way, before anything moves: photos is read-only. Move into it anyway? Skip leaves what was going there where it is.
  • Moving out of a folder you may not write into is asked about the same way, before anything moves: docs is read-only. Move from it anyway? Yes makes it writable until the move is done. Skip leaves what was in it where it is, with no copy left behind. A locked file is asked about too, and arrives locked.
  • What was skipped or failed stays marked, and is in the journal.

What a copy carries

  • Its contents, and its dates — modified and created.
  • Its permissions — who may read, write and run it. The set-user and set-group ID bits are left off.
  • Its extended attributes — Finder tags, the resource fork, where it was downloaded from — and its access control list. Where they cannot come, the file is copied without them.
  • Links as links, pointing where they did. A relative link keeps meaning the same thing from its new place.
  • A file’s ._ companion — where a disk such as a memory card keeps its extra information — travels with it, rather than as a file of its own.

A folder the copy makes gets its original’s dates and permissions too, once everything in it has arrived — so a read-only folder can still be filled.

A pipe, a socket or a device is not copied. It has no contents to read to the end of, so it is never opened: the rest of the copy goes on without it, and when the copy ends a notice says how many were left out and why. The journal names each. Copying one by itself makes nothing, and says the same.

A file is never half there. It is written under a temporary name beside its destination, and takes its own name only once it is whole. A copy stopped part-way removes the file it was writing.

By default a copy waits, at the end, for the disk to have everything, and says writing to the device while it does. Once it is done, a card or drive is safe to pull out. Copy waits for device chooses how it waits.

Moving

Within one disk, a move renames each thing in one step, however much is in it: it is instant, and everything about it stays as it was. A folder arriving where a folder of the same name is goes into it, and that is renames as well: each file with nothing in its way, and each folder the other does not have, whole. Only a file in the way is asked about, and Overwrite and Rename and keep both are still a rename, so nothing is copied; the file written over is gone at once.

To another disk, a move copies, then removes the originals. Move removes originals says when:

  • all at once, the default: once everything is copied and on the disk. The panel says removing the originals while it does. A move stopped before then has left copies, and every original where it was.
  • as it goes: each original once its own copy is in place. A move stopped part-way has moved some things and not others.

Either way, a file that fails to copy keeps its original, an original that will not go is left and the journal says so, and a folder is removed only once it is empty — one still holding something that did not move stays. A pipe, a socket or a device moves only within one disk, where it is renamed like anything else: to another disk it stays where it is, with the folders it is in, and a notice says so when the move ends. How long a move waits for the disk is Move waits for device, and within one disk Rename waits for device.

Dragging

Drag rows with the left button to the other pane, onto a folder, or out of the window to Finder or any application that takes files. Files dragged in from Finder land the same way.

  • A drag starts once the pointer has moved a couple of cells; less is a click.
  • A drag started on a marked row carries every marked row; started on another row, only that one. How many are going travels beside the pointer.
  • Over a folder’s name, a drop goes into that folder; over .., into the one above; anywhere else in a pane, into the pane’s folder.
  • Hold over a folder for a moment and it opens, so you can go further in before letting go.
  • A drop on a file’s name, on a pane that cannot be written into — a list of disks, search results — or into the folder the files are already in is refused, and the pointer says so before you let go.

Dropping opens the same dialog as F5. Within one disk it starts as Move, and between disks as Copy; hold ⌥ to make it Copy, or ⌘ to make it Move. Files from several disks at once start as Copy. Either way, Action changes it before it starts.

Dropped outside the window, the files are the other application’s to handle, as a drag from Finder would be: Finder itself moves them within one disk and copies them between disks, without asking.

Pasting

⌘V copies the files on the clipboard — copied here or in Finder — into the active pane’s folder, and ⌥⌘V moves them. Both ask first, in the same dialog, titled Paste or Move. Nothing is removed when files go on the clipboard: a move removes each original only once it has arrived. The clipboard has the rest, and what a paste does when the clipboard holds something other than files.