I know seeing “The operation can’t be completed. An unexpected error occurred (error code -36)” right when you’re trying to copy that huge folder is enough to make you want to throw the Mac out the window. Deep breath. This one’s annoying, but it’s usually a quick fix. Here’s what works.
The Quick Fix: Dot-files and Metadata
Most of the time, error -36 is a problem with macOS metadata files, especially the hidden .DS_Store files. When you copy a folder that’s got a corrupted or unreadable .DS_Store, the copy fails and throws that cryptic -36 at you. The fix: strip those metadata files before copying.
Open Terminal (found in Applications > Utilities) and run this command against the folder that won’t copy:
dot_clean /path/to/your/folder
Replace /path/to/your/folder with the actual path. You can drag the folder onto the Terminal window after typing dot_clean and it’ll fill in the path for you. Hit Return, wait a few seconds, then try the copy again.
If you’re copying files from an external drive, network share, or a USB stick, you might need to run dot_clean on the source and the destination. In my years running a help desk, I’d say that clears up about 80% of error -36 cases. Don’t ask me why Apple never made this a Finder option—it's been a pain point since OS X Snow Leopard.
Why This Works
macOS writes .DS_Store files to every folder it displays, storing view settings like icon positions and background colors. When that file gets corrupted—say, from an interrupted write or a drive that wasn’t ejected properly—Finder tries to read it during the copy and chokes. dot_clean deletes those files or merges them, wiping out the corruption. It doesn’t touch your actual files, so it’s safe to run.
Still Stuck? Less Common Variations
If dot_clean didn’t fix it, here’s what else I’ve seen cause error -36, in order of likelihood.
1. APFS or HFS+ File System Corruption
If you’re copying “to” an external drive and getting -36, the destination file system might have issues. Open Disk Utility, select the drive, and click First Aid. Run it—this repairs the file system’s directory structure. This is especially common on older drives formatted as HFS+ that were never updated to APFS. I’ve seen drives that have been yanked out of USB ports one too many times throw this error constantly until First Aid runs.
2. Permissions on the Destination
Less common, but if you’re copying to a folder that’s owned by root or another user, Finder will sometimes report -36 instead of the usual “You don’t have permission.” Check the destination folder’s permissions by selecting it in Finder and pressing Cmd+I. Look at the Sharing & Permissions section at the bottom. If you’re not listed with Read & Write access, change it, set “Apply to enclosed items” if needed, and try again.
3. Files with Illegal Characters or Name Conflicts
I used to see this more with older file servers, but it still pops up. If a filename contains a character that the destination file system doesn’t allow (like a colon on some FAT32 drives), the copy fails. Rename the file to something simple like test.txt and test the copy. If it works, you’ve found the culprit. If you’re copying a large set of files, it might be one bad apple in the bunch. Copy the folder in smaller chunks to isolate which file triggers it.
4. Third-Party Sync Tools & Antivirus
Dropbox, Google Drive, or any antivirus extension that hooks into Finder can interfere with file operations. I once spent an hour tracing error -36 to an outdated Google Drive sync agent. Temporarily quit those apps (check your menu bar for their icons) and retry the copy. If it works, update or reinstall the offending software. It’s not glamorous, but it’s real.
Prevention: Stop Error -36 Before It Starts
You don’t have to just wait for this to bite you again. These habits have kept my Macs clean:
- Always eject external drives properly. Drag them to the Trash or press Cmd+E in Finder. Pulling the cable mid-write is the #1 cause of corrupted metadata and file system damage.
- Run First Aid monthly. Don’t wait for errors. Open Disk Utility and run First Aid on your internal and external drives. This catches small problems before they turn into -36.
- If you copy the same folders a lot, run
dot_cleanon them weekly. You can set up a simple cron job or just do it manually when you’re about to copy something important. Takes 10 seconds. - Update macOS, but not blindly. Apple fixed some -36 bugs in Big Sur and Monterey, but older versions like Mojave still have them. If you’re stuck on an older OS, the
dot_cleantrick is your best friend.
One more thing—if you’re copying from a network share (SMB) and get -36, it’s often not your Mac at all. It’s the server’s file system. Ask your admin to check the server’s disk health or try connecting via AFP if it’s still supported. But that’s a whole different troubleshooting session.
Start with dot_clean. It’s the fix that works nine times out of ten, and you’ll be back to copying files in under a minute.