blog

How Do You Fix Error Code -36 When Copying Files on Mac?

Seeing Error Code -36 while copying files on a Mac can be alarming, especially when it happens during an important transfer to an external drive, SD card, USB stick, network share, or another folder. The message often appears as “The Finder can’t complete the operation because some data in ‘filename’ can’t be read or written,” and it usually indicates that macOS is having trouble reading hidden metadata, file attributes, or damaged data associated with the item being copied.

TLDR: Error Code -36 is commonly linked to hidden dot underscore files, file system problems, drive corruption, or permission issues. The quickest safe fix is to run the dot_clean command on the folder you are copying, then try the transfer again. If that does not work, check the destination drive with Disk Utility First Aid, confirm permissions, and test the copy in smaller batches. Avoid repeatedly forcing the transfer until you have checked the disk, because the error can sometimes point to storage damage.

What Error Code -36 Means on macOS

Error Code -36 is an input/output error. In practical terms, macOS is telling you that Finder could not properly read from the source location or write to the destination location. This does not always mean your file is permanently damaged, but it does mean the copy process encountered something it could not handle reliably.

The error is historically associated with hidden AppleDouble files, often known as dot underscore files because their names begin with ._. These files store extra metadata such as resource forks and extended attributes, especially when files are copied between macOS and non-Mac file systems such as FAT32, exFAT, SMB shares, or older network volumes.

However, dot underscore files are not the only cause. Error -36 may also be triggered by bad sectors, failing external drives, corrupted file system structures, unsupported characters in file names, damaged memory cards, interrupted transfers, or inadequate permissions.

Before You Start: Protect Your Data

Before applying fixes, take a careful approach. If the files are important and exist only in one location, avoid repeatedly dragging and dropping them in Finder. Repeated failed attempts can make troubleshooting harder and may increase risk if the source disk is unstable.

  • Do not erase or reformat any drive until the files are safely backed up.
  • Try to identify whether the problem is one file, one folder, or the entire drive.
  • Check available space on the destination volume.
  • Disconnect the drive properly only after transfers stop, not during an active copy.
  • If the drive is making clicking sounds or repeatedly disconnecting, stop using it and consider professional data recovery.

Fix 1: Use the dot_clean Command

The most common solution for Error Code -36 is the built-in macOS command dot_clean. This tool merges or removes problematic AppleDouble metadata files in a directory. It is especially useful when copying folders from a Mac to an external drive formatted as exFAT or FAT32, or when moving files from older storage media.

Follow these steps carefully:

  1. Open Terminal. You can find it in Applications > Utilities > Terminal.
  2. Type the following command, followed by a space:

    dot_clean
  3. Drag the problematic folder from Finder into the Terminal window. This automatically inserts the correct path.
  4. Press Return.
  5. When the command finishes, try copying the folder again.

For example, the completed command may look similar to this:

dot_clean /Users/yourname/Desktop/FolderName

If the problem folder is on an external drive, drag that folder into Terminal after typing dot_clean . You do not need to manually type the full path unless you are comfortable doing so.

Important: Use dot_clean on the folder that contains the files producing the error, not necessarily on your entire Mac. The command is generally safe, but it is still best to be precise.

Fix 2: Copy Files in Smaller Batches

If dot_clean does not resolve the issue, try copying the files in smaller groups. This helps determine whether one specific file is causing the failure. Finder may stop the entire transfer because of one unreadable or problematic item, even if the rest of the folder is healthy.

Create a new folder on the destination drive, then copy a few subfolders or files at a time. When the error appears again, narrow down the selection until you identify the specific file. Once you find it, you can attempt to rename it, compress it, duplicate it, or recover it from another backup.

This method is slow, but it is reliable. It also prevents you from making assumptions about the entire disk when only a single file may be affected.

Fix 3: Run First Aid in Disk Utility

If Error Code -36 happens repeatedly, especially with an external drive, SD card, USB flash drive, or backup disk, you should check the file system. Apple’s Disk Utility includes a tool called First Aid that can detect and repair many disk directory problems.

  1. Open Disk Utility from Applications > Utilities.
  2. In the menu bar, choose View > Show All Devices.
  3. Select the affected volume or physical drive in the sidebar.
  4. Click First Aid.
  5. Click Run and wait for the process to finish.
  6. Review the result and try the copy again.

If First Aid reports that the disk cannot be repaired, do not ignore the warning. Copy whatever data you can to another reliable drive. After the data is safe, you may need to erase and reformat the problematic disk. If the same drive continues to fail after reformatting, replace it.

Fix 4: Check File and Folder Permissions

Permissions control who can read, write, and modify files. If macOS cannot access part of a folder or cannot write to the destination, Error Code -36 may appear.

To check permissions in Finder:

  1. Right-click the file, folder, or drive and choose Get Info.
  2. Scroll to Sharing & Permissions.
  3. Confirm your user account has Read & Write access.
  4. If necessary, click the lock icon, enter your administrator password, and adjust the permissions.

For external drives, also check whether the volume is mounted as read-only. Some NTFS-formatted Windows drives can be read by macOS but not written to without additional software. If you are copying files to such a drive, a write failure may occur.

Fix 5: Rename Problematic Files

Sometimes the issue is caused by file names that contain unusual characters, very long paths, or names that are acceptable on macOS but problematic on another file system or network server. Rename the problem file or folder using simple letters and numbers, then attempt the copy again.

A safe naming style would be something like:

  • ProjectPhotos2026
  • InvoiceMarch.pdf
  • ClientVideoFinal.mov

Avoid slashes, colons, invisible characters, emoji, or extremely long names when copying to external drives or shared systems. This is particularly important when transferring files between Mac, Windows, Linux, cameras, and network attached storage.

Fix 6: Compress the Folder Before Copying

If Finder struggles with metadata or many small files, compressing the folder into a ZIP archive can help. Right-click the folder and choose Compress. macOS will create a .zip file, which you can then copy to the destination.

This method works because Finder transfers one archive instead of many individual files and metadata entries. After the ZIP file is copied, you can unzip it at the destination if needed. If the compression process itself fails, that suggests the source files or disk may be damaged.

Fix 7: Try a Different Cable, Port, or Drive

Hardware problems can also produce Error Code -36. A weak USB cable, failing hub, loose adapter, or insufficient power can interrupt file transfers and cause read/write errors. This is common with portable hard drives connected through low-quality adapters or unpowered USB hubs.

Try the following:

  • Connect the drive directly to the Mac instead of using a hub.
  • Use a different USB, Thunderbolt, or USB C cable.
  • Try a different port on the Mac.
  • Test the same copy operation with another external drive.
  • If possible, test the source drive on another Mac.

If the error disappears with a different cable or port, the file was probably not the main issue. The connection was likely unstable.

Fix 8: Use Terminal to Copy the Files

Finder is convenient, but Terminal can sometimes provide clearer results. Advanced users may use commands such as cp or rsync to copy files. rsync is particularly useful because it can continue through some errors and report exactly where problems occur.

A basic example is:

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

Be careful with paths and trailing slashes. If you are not comfortable with Terminal, do not experiment on important data without a backup. A mistyped command can copy files to the wrong place or overwrite data.

Fix 9: Check the Drive Format

The destination drive’s format matters. For Mac-only use, APFS is usually best for modern Macs, while Mac OS Extended may be suitable for older systems or mechanical backup drives. For sharing between Mac and Windows, exFAT is common, but it can be more vulnerable to corruption if drives are unplugged without ejecting.

If you frequently see Error Code -36 on an exFAT drive, back up its contents and consider reformatting it. Reformatting erases the drive, so only do this after all important data is safely copied elsewhere.

When the Error Suggests a Failing Drive

If the error affects many files, First Aid reports serious issues, transfers are extremely slow, or the drive disconnects unexpectedly, the storage device may be failing. Other warning signs include clicking noises, overheating, folders disappearing, or repeated prompts saying the disk was not ejected properly.

In that situation, your priority should be recovery, not repair. Copy the most important files first. Do not run unnecessary tests for hours on a failing disk, because heavy use can make the damage worse. If the files are irreplaceable, consult a reputable data recovery service.

How to Prevent Error Code -36 in the Future

You cannot prevent every file transfer problem, but you can reduce the risk substantially with good storage habits.

  • Always eject external drives properly before unplugging them.
  • Keep at least two backups of important files, preferably one local and one off-site or cloud-based.
  • Use reliable cables and adapters rather than cheap or damaged accessories.
  • Format drives appropriately for how they will be used.
  • Avoid interrupting large transfers by closing the Mac lid or disconnecting power.
  • Run First Aid occasionally on drives that are heavily used.

Final Thoughts

Error Code -36 on a Mac is frustrating, but it is usually fixable. Start with the least invasive solution: run dot_clean on the affected folder, then retry the copy. If the problem continues, isolate the file, check the disk with First Aid, verify permissions, and test the hardware connection.

Most cases involve metadata conflicts or minor file system trouble, but repeated Error -36 messages should be taken seriously. They can be an early sign of disk corruption or hardware failure. A careful, methodical approach gives you the best chance of completing the transfer safely while protecting your data.