How to Fix Error Code 36 in Mac OS X Finder
On some rare occasions when trying to copy files, Mac users may encounter “error code 36”, which completely halts the copy or move process in the Mac OS X Finder. The full error is usually read as “The Finder can’t complete the operation because some data in “FileName” can’t be read or written. (Error code -36)”. The filename is sometimes .DS_Store, but it can happen with just about any file on a Mac too.
If you run into Error Code -36 on a Mac, there’s usually a really simple solution thanks to a handy command line tool called “dot_clean”. If you’ve never heard of dot_clean, you’re certainly not alone, and the manual page for the command explains that it “merges ._* files with corresponding native files.” which may not sound like much to the casual user, but given the oft cause of Error 36 are files prefixed with a dot, that can be exactly what you need to do.
How to Resolve Error 36 in Mac OS X Finder with dot_clean
To use dot_clean, you’ll want to point it at the directory which is being copied and throwing the Error Code 36, the basics look like this:
- Launch the Terminal (found in /Applications/Utilities/ or with Spotlight)
- At the command prompt, type:
- When dot_clean is finished, attempt the file copy again and it should succeed with no error code
For example, if copying ~/Documents/FileBackups/ is the problematic directory, use:
That should be all that is necessary to resolve the issue, just be sure to attempt the file/directory transfer immediately after the command is run.
Technically you could point dot_clean at an entire volume but that’s probably not necessary unless the -36 error is continuously triggered in Finder when trying to backup an entire drive manually.
If the problem is recurrent and you get it constantly when trying to copy files to and from a networked Mac, a network share, external drive of some sort, or to and from a Windows computer, you can also try to delete all .DS_Store files on a Mac using the command line, which can work as a temporary workaround if for some reason dot_clean fails. That was actually what I had done in the past to get around this and other similar input/output error messages before discovering this specific command approach.
I just ran into this recently and found that dot_clean worked fine to resolve Error Code -36 when copying a directory from a Mac with OS X 10.9.5 to a Mac with OS X 10.10.3 and also to a Windows PC, the original machine was repeatedly throwing the error. It appears as if this error has had an uptick with Mac OS since Sierra, El Capitan, and OS X Yosemite as well, maybe suggesting some incompatibility with certain dot files from other OS versions. Unlike some of the error weird error messages in Mac OS X, a reboot or Finder restart didn’t do the trick. A big thanks to JacobSalmela for the easy solution.
If this worked for you, or you know of another trick to fix Error Code 36 in the Mac OS X Finder, let us know in the comments.