Error code -50 on a Mac when copying or moving a file
Error code -50 on a Mac means the system asked a disk or folder to do something and got back an answer it could not use. Finder words it as “The operation can’t be completed because an unexpected error occurred (error code -50).” The cause is almost always at the destination: a drive format, a file name, or hidden file metadata that the other side will not accept. Work through the checks below in order; most people are done by the third.
What -50 actually means
The number is old. It dates back to the classic Mac OS, where it stood for a parameter error: some part of a request was something the receiving end would not take. Modern macOS still uses the code when a copy, move or rename is rejected for a reason Finder cannot put into words.
That is why the message is so vague. The file is rarely damaged and the drive is rarely failing; more often, something about the file does not fit where you are trying to put it. The usual suspects:
- The file name. Drives formatted for Windows (exFAT and MS-DOS FAT) refuse some characters that macOS allows, including the colon, question mark, asterisk, quote marks, angle brackets, the vertical bar and the backslash. Names that end in a space or a period cause trouble too, as do very long names.
- Hidden metadata. macOS attaches extended attributes to files: Finder tags, the “downloaded from the internet” flag, and assorted data that apps store alongside a document. Some network drives and Windows-formatted disks cannot store all of it, and a copy can stop right there.
- The destination itself. A drive mounted read-only, a folder you lack permission to write to, or a network share that dropped and quietly reconnected.
- Software in the middle. Security tools that scan files as they are written, and sync folders busy with the same file, can interrupt a copy partway.
Try these first
- Copy one file on its own. If a batch fails, find the file that triggers it by dragging a few at a time. A single repeat offender points at that file’s name or metadata. Failures that move around point at the drive or the connection.
- Rename the file. Give it a short, plain name using letters, numbers, hyphens and spaces, and keep the extension. Try the copy again.
- Unlock it. Select the file, choose File, Get Info, and clear the Locked checkbox if it is checked.
- Reconnect the drive. Eject it, unplug it, and connect it again, using a different port or cable if you have one. For a network share, eject it in Finder, then choose Go, Connect to Server and connect again.
- Relaunch Finder. Hold Option, Control-click the Finder icon in the Dock, and choose Relaunch.
Check the drive and its format
Open Disk Utility (in Applications, Utilities) and select the destination drive in the sidebar. The line under its name shows the format.
- APFS or Mac OS Extended. These are native to the Mac and accept any name a Mac can make. A -50 here is more likely a permission problem or a fault on the disk.
- ExFAT or MS-DOS (FAT). Shared formats meant for Windows PCs, cameras and TVs. File names and hidden attributes are the likely cause. MS-DOS (FAT) also cannot hold a single file over 4 GB, which produces a different message; that error has its own explanation.
- NTFS. A Windows format that macOS can read but not write, so nothing can be copied onto it without extra software.
With the drive still selected, click First Aid, then Run. First Aid checks the structure of the file system and fixes what it can. If it reports errors it cannot repair, copy anything important off the drive before you do anything else with it.
For an external drive in an Apple format, there is one more setting. Select the drive in Finder, choose File, Get Info, click the lock at the bottom of the window and enter your password, then check “Ignore ownership on this volume”. That stops permission settings made on another Mac from getting in the way.
Use Terminal to get a real error message
Finder turns the problem into a number. Terminal usually tells you in words. Open Terminal (also in Applications, Utilities), type cp followed by a space, drag the file onto the window, drag the destination folder on after it, and press Return. The result looks like this:
cp "/Users/you/Movies/Holiday.mov" "/Volumes/BACKUP/"
If the copy fails, the reply names the problem. “Invalid argument” usually means the file name, “Permission denied” means the folder, and “Input/output error” points at a damaged file or a faulty disk.
To test whether hidden metadata is the culprit, add -X, which tells the Mac’s copy command to leave extended attributes behind:
cp -X "/Users/you/Movies/Holiday.mov" "/Volumes/BACKUP/"
If that works where Finder failed, you have your answer. The copy holds the complete contents of the file; it simply arrives without its Finder tags and similar extras.
When the file itself is the problem
If one file fails on every drive and over every connection, while others copy fine, the file may be damaged. Try opening it. A video that stops early, a PDF with missing pages or a document that will not open is telling you the same thing the copy did.
Look for a second copy before anything else: the original on a camera card or phone, an email attachment, a Time Machine backup. If there is none, Manatee can attempt a repair on videos, PDFs and Word documents. It writes a new copy beside the damaged file and never changes the original, and it is honest about the outcome: Fixed, Partial (the first eleven minutes of a video, say) or Not fixable. Everything runs on the Mac, so a private file is never uploaded anywhere to be repaired. The first 24 hours are free with every feature.
Manatee does not repair drives, though. If First Aid finds problems it cannot fix, no file tool will solve them; copy what you can to a healthy disk.
If a copy did finish but you no longer trust it, verifying a file arrived intact shows how to compare the two copies with a checksum.
Questions
Does error -50 mean my drive is failing? Usually not. It is far more often a name, a format or a permission. If it appears with many different files, gets worse over time, or comes with errors from First Aid, back the drive up and plan to replace it.
Why do some files copy and others do not? Because the trigger is particular to those files: a character in the name, a very long name, or attributes the other files do not carry. Copy the failures one at a time and compare their names.
Will reformatting the drive fix it? Sometimes, if the format is the problem, but formatting erases everything on the drive. Copy the contents somewhere else first. Choose exFAT only if the drive also has to work with Windows PCs; for a drive used only with Macs, APFS or Mac OS Extended avoids these naming limits entirely.
Is it the same as error -36? Related, but not the same. Error -36 means data could not be read or written, which more often points at a damaged file or memory card than at a name or format.