You're dragging a folder from your Mac to an external drive, and halfway through, macOS stops dead with "The operation can't be completed because an unexpected error occurred (error code -36)". Sometimes it's a single file, sometimes it's a whole directory. The annoying part is that some files copy fine—it's the ones with extra data attached that trip it up.
I've seen this on almost every macOS version, from Mojave to Sonoma, and it's especially common when copying to FAT32 or exFAT formatted drives. But it can happen on APFS and HFS+ too, which makes it all the more frustrating.
What's Actually Causing Error -36?
Here's the plain-English version. On older Mac file systems (HFS+), every file can have a resource fork—a hidden sidecar that stores things like custom icons, file previews, or extended attributes. When you copy a file to a drive that doesn't support resource forks (most non-Apple formats), macOS tries to separate that metadata. If it fails, you get error -36.
So the real culprit is usually one of two things: either the destination drive's formatting doesn't play nice with macOS metadata, or the file itself has corrupt or oversized resource fork data. The fix is to strip or recreate that metadata properly.
Fix 1: The Quick Command That Often Does It
Open Terminal (it's in Applications > Utilities) and run this on the folder that's failing:
dot_clean -m /path/to/folder
If you're not sure of the path, just drag the folder from Finder into the Terminal window after typing dot_clean -m. This command merges the resource forks back into the main file, which clears up most -36 errors. It's the first thing I try, and it works about 70% of the time.
Fix 2: Turn Off Spotlight Indexing (If It's a Network Drive)
If the error is happening on a network drive or a mount point, Spotlight's metadata indexing can interfere. Go to System Settings > Spotlight > Spotlight Privacy and add the problematic drive to the exclusions list. Then unmount and remount it. This is a bit of a long shot, but I've seen it fix errors on SMB shares.
Fix 3: Check the Drive Format
If you're copying to a USB stick or SD card that's formatted as FAT32, you're asking for trouble. FAT32 has a 4GB file size limit and no support for resource forks. The real fix is to reformat the drive to exFAT—it handles larger files and macOS metadata better. But wait: reformatting wipes the drive, so back up your data first.
To check the format:
- Right-click the drive icon on your desktop and select Get Info.
- Look under General for the format (it'll say something like "MS-DOS (FAT32)" or "ExFAT").
- If it's FAT32, use Disk Utility to erase it as ExFAT.
Fix 4: Use the Terminal to Copy (Bypasses Finder's Fussiness)
Finder does a lot of background checks that can trip on metadata. The Terminal command ditto is more forgiving. Try:
ditto /path/to/source /path/to/destination
This copies the entire directory, including resource forks, and it often succeeds where Finder fails. I've used this to rescue thousands of photos from a failing hard drive.
Fix 5: Check for Corrupt Spotlight Index on the Source Drive
This one's sneaky. If the error happens on files that are on your Mac, not the external drive, a corrupt Spotlight index could be causing false metadata reads. To rebuild the index:
- Go to System Settings > Spotlight > Spotlight Privacy.
- Drag your entire Mac's hard drive into the exclusion list.
- Wait a minute, then remove it from the list.
Spotlight will rebuild its index in the background. Give it an hour or two, then try copying again.
What If It Still Fails?
If none of these worked, the file itself might be truly corrupt—the resource fork data might be unreadable. Open the file in its parent app and try "Save As" to create a fresh copy. If that fails too, the file is toast. But before you give up, try the nuclear option: dd to copy the raw bytes. It's advanced, so only do this if you're comfortable with the command line.
dd if=/path/to/sourcefile of=/path/to/destinationfile
That copies the file raw, ignoring all metadata. You might lose the custom icon or preview, but you'll have the data.
One last thing: if you're on an external drive that's formatted as APFS and still hitting -36, check the drive's health. Connect it to a different Mac or use First Aid in Disk Utility. A failing drive can throw phantom errors like this.
Hope one of these gets you moving again. Let me know in the comments if you find another fix—I'm always after new tricks.