Tuesday, February 24, 2015

How to Quickly Fix Error Code -36 in Finder of Mac OS X


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 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.

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 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:

1. Launch the Terminal (found in /Applications/Utilities/ or with Spotlight)
2. At the command prompt, type:
dot_clean /Path/To/Directory/With/Problem/
3. 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:

dot_clean ~/Documents/FileBackups/

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 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 OS X, a reboot or Finder restart didn’t do the trick. A big thanks to JacobSalmela for the easy solution.

No comments:

Post a Comment