How Do You Fix Error Code -50 When Copying Files on macOS?

How Do You Fix Error Code -50 When Copying Files on macOS?

Seeing Error Code -50 while copying files on macOS can be alarming, especially when the file appears normal and the destination drive seems to have enough space. This error usually means macOS cannot complete the read or write operation because of a file system issue, invalid file metadata, a problematic filename, permissions trouble, or an unreliable external drive or network location. The good news is that in many cases, the problem can be fixed without replacing the Mac or losing data.

TLDR: Error Code -50 on macOS usually happens when Finder cannot copy a file because of disk errors, bad metadata, incompatible filenames, permissions, or external drive problems. Start with simple fixes such as restarting Finder, renaming the file, trying another location, and checking the destination drive. If that does not work, use Disk Utility First Aid, remove extended attributes with Terminal, check permissions, and verify the health and format of the drive. Always back up important files before repairing, reformatting, or running deeper troubleshooting steps.

What Error Code -50 Means on macOS

All Heading

Error Code -50 is a general macOS file operation error. It often appears during a copy, move, delete, or transfer operation and may say something like “The operation can’t be completed because an unexpected error occurred. Error code -50.” Although the message is vague, it generally points to a problem with how macOS is reading the source file or writing to the destination.

This can happen when copying files to an external hard drive, USB flash drive, SD card, network share, NAS device, or even another folder on the internal disk. Because the error can come from several sources, the best approach is to troubleshoot methodically, starting with the least invasive fixes first.

Common Causes of Error Code -50

Before applying fixes, it helps to understand what may be causing the failure. The most common causes include:

  • Invalid or incompatible filenames: Some characters, very long names, or names created on other operating systems can cause copy issues.
  • Damaged file metadata: macOS files can contain extended attributes, resource forks, and Finder metadata that occasionally become corrupted.
  • Disk directory errors: The source or destination volume may have file system problems.
  • Permission restrictions: Your user account may not have correct access to the file or destination folder.
  • External drive format issues: Drives formatted as FAT32, exFAT, NTFS, or older file systems can behave unpredictably in certain situations.
  • Unstable hardware or connection: A failing cable, hub, adapter, drive enclosure, or port can interrupt file transfers.
  • Network share problems: SMB, AFP, or NAS permissions and connection interruptions may trigger the error.

1. Restart Finder and Try the Copy Again

Begin with the simplest fix. Finder itself can get stuck during file operations, especially after a failed transfer or when an external drive disconnects unexpectedly.

  1. Click the Apple menu.
  2. Select Force Quit.
  3. Choose Finder.
  4. Click Relaunch.

After Finder relaunches, try copying the file again. If you are copying to an external drive, eject it properly, reconnect it, and repeat the transfer. Also try copying the file to a different folder first, such as the Desktop, to determine whether the problem is with the file or the destination.

2. Rename the File or Folder

A surprising number of Error Code -50 cases are caused by problematic filenames. This is especially common with files downloaded from the internet, transferred from Windows, restored from backups, or copied from older drives.

Rename the file using only basic letters, numbers, spaces, and a simple extension. Avoid special characters such as:

  • /
  • \
  • :
  • ?
  • *
  • < or >
  • Emoji or unusual symbols

For example, rename Project: Final/Version? to Project Final Version. If the file is inside a folder with a long or complex name, rename the folder as well. Then attempt the copy again.

3. Check Available Space on the Destination Drive

Even if a drive appears to have enough room, macOS may fail if the file system has limited usable space, hidden snapshots, reserved space, or disk errors. Select the destination drive in Finder and press Command + I to open Get Info. Confirm that the Available space is comfortably larger than the file or folder you are copying.

If the file is very large, also check the drive format. A FAT32-formatted drive cannot store individual files larger than 4 GB. In that case, copying a large video, disk image, or archive may fail. For modern Mac use, APFS is preferred for SSDs, while Mac OS Extended Journaled may be suitable for older spinning hard drives. If the drive must work with both Mac and Windows, exFAT is common, but it can be more vulnerable to corruption if disconnected improperly.

4. Run Disk Utility First Aid

If the issue persists, use Disk Utility to check both the source and destination volumes. First Aid can repair many directory and file system problems that cause copying errors.

  1. Open Disk Utility from Applications > Utilities.
  2. In the sidebar, select the volume you are copying from.
  3. Click First Aid, then choose Run.
  4. Repeat the process for the destination volume.
  5. If Disk Utility reports repairs, restart the Mac and try again.

If you are checking your startup disk and Disk Utility cannot complete the repair, restart into macOS Recovery and run First Aid from there. On Apple silicon Macs, shut down, then hold the power button until startup options appear. On Intel Macs, restart and hold Command + R.

5. Remove Corrupted Metadata with Terminal

macOS stores extra metadata with files, including extended attributes and resource fork information. If this metadata becomes damaged, Finder may refuse to copy the file and show Error Code -50. One well-known command for cleaning certain metadata issues is dot_clean.

Open Terminal from Applications > Utilities and use the following command:

dot_clean /path/to/folder

The easiest way to avoid typing the path manually is to type dot_clean with a trailing space, then drag the affected folder into the Terminal window. Press Return to run the command. After it finishes, try the copy operation again.

You can also remove extended attributes from a specific file with:

xattr -c /path/to/file

Use this carefully. Extended attributes are usually not essential, but they can contain quarantine data, Finder information, or application-specific metadata. If the file is important, make a backup copy before modifying attributes.

6. Check File and Folder Permissions

Permission problems can also prevent copying. Select the file or folder, press Command + I, and look at the Sharing & Permissions section. Make sure your user account has Read & Write access. Do the same for the destination folder or drive.

If you own the folder and need to apply permissions to its contents, click the lock icon, authenticate with your administrator password, then use the gear or more options menu to apply permissions to enclosed items. Be cautious when changing permissions on system folders, application folders, or shared business storage. Incorrect permission changes can create new problems.

7. Try a Different Copy Method

If Finder fails, another copy method may succeed and give more useful feedback. You can use Terminal commands such as cp or rsync. For example:

cp -R /path/to/source /path/to/destination

For larger folders, rsync is often more reliable:

rsync -avh /path/to/source/ /path/to/destination/

The rsync command can continue through some transfer issues and display the file where the process fails. This is useful when one damaged file inside a large folder is causing the entire Finder copy to stop.

8. Test the External Drive, Cable, and Port

If Error Code -50 appears mainly when using an external drive, do not assume the file is the problem. The issue may be physical. Try a different USB C cable, USB hub, adapter, or port. If possible, connect the drive directly to the Mac instead of using a hub.

Listen for unusual clicking, repeated spin-up sounds, or sudden disconnections. These can indicate drive failure. For SSDs and flash drives, watch for disappearing volumes, extremely slow transfers, or repeated mount errors. If the drive contains important data, prioritize copying the most valuable files first before running heavy repair operations.

9. Check Network Shares and NAS Devices

When copying to a server, NAS, or shared folder, Error Code -50 may be caused by network interruptions, SMB compatibility, file locking, or server permissions. Disconnect and reconnect to the share, restart the router or NAS if appropriate, and verify that your account has permission to write to the destination folder.

Also check whether the filename is allowed by the server’s operating system. A name that works on macOS may not be valid on a Windows-based SMB share. If the transfer fails with one specific file, rename it and try again.

10. Reformat the Destination Drive Only After Backing Up

If the error affects many files and Disk Utility repeatedly finds problems, the destination drive’s file system may be damaged. Reformatting can help, but it erases the drive completely. Before formatting, copy any recoverable data to another safe location.

To reformat, open Disk Utility, select the physical drive or volume, click Erase, and choose an appropriate format. For a Mac-only SSD, choose APFS. For a Mac-only mechanical drive, choose Mac OS Extended Journaled if APFS is not ideal for your workflow. For cross-platform use, choose exFAT, but make sure you always eject the drive properly before unplugging it.

When to Suspect File Corruption

If the same file fails no matter where you copy it, while other files copy normally, the file itself may be corrupted. Try opening it in its original application. If it opens, use Save As or export a new copy. For photos, videos, archives, and disk images, corruption may prevent full recovery. If the file came from another drive or download source, obtain a fresh copy if possible.

Final Recommendations

Error Code -50 is frustrating because it does not identify one exact cause. However, a careful process usually reveals the source. Start by renaming the file, restarting Finder, checking free space, and trying a different destination. Then run Disk Utility First Aid, clean metadata with dot_clean or xattr, review permissions, and test your external hardware.

Most importantly, treat repeated Error Code -50 messages as a warning sign. If the error appears frequently on the same drive, back up your data immediately and investigate the drive’s health. A single failed copy may be a minor metadata issue; repeated failures may indicate a disk, cable, file system, or network problem that should be resolved before data is lost.