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

Feb 21, 2015 - 43 Comments

Error Code 36 in Mac Finder resolved with OS X dot_clean tool

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:
  3. dot_clean /Path/To/Directory/With/Problem/

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

Fix error code 36 in Finder of OS X

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.

Mac error code 36

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.

If this worked for you, or you know of another trick to fix Error Code -36 in the OS X Finder, let us know in the comments.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks, Troubleshooting

43 Comments

» Comments RSS Feed

  1. Oh my goodness, I’ve been suffering from exact issue recently! In fact, I had to decommission an old Mac Mini because both the internal HDD and an add-on Lacie drive suffered this problem when trying to move *any* files. I’m going to resurrect the Mini to try and salvage the files … and use the external drive for future storage!

  2. Bernhard says:

    Hi, Prescott, before ripping your ‘mini’ apart have you tried any disk repair utilities like Apple’s “Disk Utility” or—way better—”DiskWarrior”?

  3. Wharf Xanadu says:

    Yea I have seen persistent file system errors when a drive is failing too so that’s something to consider if this has no resolution

  4. Kevin McGowan says:

    Any ideas why my Time Capsule has decide that some of the files on there no longer belong to me. When I look at the permissions I am no longer listed as the owner and no only have custom permissions that no longer allow me to edit the file or delete it?

    • Zekester says:

      There are a couple of things worth trying, in my experience (someone correct me if I’m off base, please). 1) If you can get to the TC drive (I think that it should be visible in Disk Utility) try repairing Permissions. I’ve heard that many times about Macs – they usually work well, but if they start acting squirrrely, repairing permissions is a good first step. 2) Try a utility like Onyx. Onyx is from France and is free. One of the things it does when you run it is to repair permissions. Use the “Automation” button from its menu and it’ll do its actions automatically. 3) As suggested above – DiskWarrior. I just got my copy, (which comes on a flash drive), but haven’t run it yet. It ‘s had a good reputation in the Mac community for many years.

  5. Thanks for sharing this Terminal command.

    For users not comfortable with the command line interface you can use the free utility Onyx (www.titanium.free.fr) which has a feature to remove .DS_Store files.

    In Onyx navigate to Maintenance > Rebuilding, second paragraph down “Appearance of folders’ content” is the option you need to tick. This option (singularly) will delete ALL .DS_Store files on your startup volume. Below that there are options to select a specific folder and options to remove .DS_Store file from only this folder or another option to remove from this folder and ALL sub-folders.

  6. Zach says:

    Great tip thank you. Having alot of issues with this error code myself lately. I will pass this tip to our users. :)

  7. bobogall1968 says:

    Last login: Mon Jun 15 11:12:55 on ttys000
    gerard-gallaghers-iMac:~ gerardgallagher52$ /Volumes/AirServer 5.3.2 dot_clean

    still wont let me launch airserver after this am i doing this right.

    • tenneesessee says:

      No you are not doing it right, and you can not modify a mounted volume disk image. Your disk image of AirServer is probably corrupt and may need to be downloaded again, your best bet would be to contact the creator of AirServer and ask them for support about their product.

      The proper command would be (it won’t work because mounted images are locked)

      dot_clean /Volumes/AirServer\ 5.3.2/

  8. AntToyProductions says:

    Okay, so I’m running Yosemite and here’s the issue I’m having here. Due to a long story I don’t want to get into I ended up losing a LOT of photos from my iPhoto with no backups to recover from. One of these albums was my professional wedding photos. FORTUNATELY I still have the original DVD so I figured it would be simple enough to just import them back into iphoto. for whatever reason, it will copy/import up to about the 115th picture and then I get this:The Finder can’t complete the operation because some data in “DF0117.JPG” can’t be read or written.
    (Error code -36)
    I was hoping I could get around this by using the “ignore permissions” trick when i select the disc and hit cmd + i but it says I can only read.
    COMPLETELY at a loss here. (why let me import some files but not the rest? WTH?!) I also attempted to sidestep the import process and just copy the files from the DVD right to a folder on the desktop to no avail. (actually that’s where I got the error noted above if that’s relevant)
    any suggestions/advice would be greatly appreciated.

  9. Bl says:

    I found mine to be an SMB problem, and connected over afp and it solved the problem. Apple’s SMB has had issues since they rolled their own in 10.7

    • Stevan says:

      Thanks, BI, that solved my issue. Could not copy more than one file from Yosemite desktop to Yosemite server until I opened via AFP.

  10. Robin says:

    Thanks for the SMB tip! Had tried several of the suggestions and none worked. Switched back to AFP and worked like a charm.

  11. Joshua Olusa says:

    I’m trying to copy some files to an external hard-drive and I Keep getting error-36. I noticed that it only happens with large video files, can anyone help? I’m using a macbook 15″.

  12. Craig Sinard says:

    One problem: IF you’re dealing with an old file saved to a DVD, as I am, files on a DVD/CD are not changeable (the source is not editable). This creates a catch-22: I need to remove the “dots” to transfer; I need to transfer to remove the dots! I’m sure that there’s a solution … a clone, mirror, disc image … something. I’ve just begun to look.

  13. nabu says:

    help please my external disk doesn’t copy any file , i try to fix it by terminal dot_clean but i got this message:

    Failed trying to change dir to .DocumentRevisions-V100
    Bad Pathname: Permission denied
    Failed trying to change dir to .Spotlight-V100
    Bad Pathname: Permission denied
    Failed trying to change dir to .Trashes
    Bad Pathname: Permission denied

    can somebody help me !!

    • Nathan Steele says:

      i have this exact same issue, is this something to do with El Capitain release? I’ve read that this was an issue with previous versions of OS X

  14. Ty says:

    I have just attempted the above fix and i am happy to say it has worked a treat. please note one you write dot_clean you can then drag the file into the terminal window which will convert it into the correct file path :-)

  15. Chris says:

    I am trying to backup a large video file and I get this error. Even when I am duplicating the file in the same directory.

    This dot_clean thing does not work for me. I also tried removing the .dsstore in the folder.

    It stops at 1.56G of 3.4 always. I wonder if this is a bad sector or something, I tried a ‘verify disk’ but didn’t return anything so ‘repair’ is disabled.

  16. Jess says:

    Oh trying this over and over. It says “done” for the dot clean, but I try to copy it right after and it doesn’t work. I am getting repeated errors from a hard drive that I am trying to remove everything from and reformat (if possible) and I even tried dot cleaning individual files and it’s still not working. Help!!!

  17. Jo says:

    I am getting this error 36 repeatedly also, I have tried Dot clean, an app to remove the ds files, and still I get this – why does Apple not fix this?

  18. chee says:

    Can this dotclean work on a folder in an external hard drive? I keep getting the error when trying to transfer music files from one older hard drive to the new one. thanks!

  19. anon says:

    This is one of the reasons people dont want to use MACs. So many errors. It is not fun to use a MAC. It is very difficult and you must hack everything to get it to work right. This is simply trying to copy a file, and I am getting this error which cannot be fixed. All I am trying to do is simply copy a file.

  20. szheller says:

    I simply went into Disk Utilities on the Mac, selected the Volume
    in question and clicked on the “Repair Disk” button. This fixed
    this issue for me this time.

    If this had not worked, I would next plug the drive into a Windows
    platform and perform chkdsk /f on the corresponding drive letter.

    • leonbakhan says:

      This is exactly what i did, when copying large video files from the external hard disk(Seagate) happened. It solved the problem for the time being.

    • NoDice says:

      I used Disk Utility just like you said. That solved the problem for me.

  21. Javarome says:

    Solved the problem for me (copying a CD file to HD). Thanks!

  22. Humdimple3 says:

    Same problem here as well, but not with all CD’s that I am uploading. I am transferring old CD-R discs of images to an external hard drive and getting the error 36. Not all folders have the error on the same ‘CD. This is occuring maybe 5% of the time. I’ve tried copying to my Mac’s desktop, but the same error occurs. Any thoughts?

    • Humdimple3 says:

      …..Also, In all cases, I will transfer a certain portion from the folder with the rest receiving the error. On occasion, I can transfer 1 by 1. Is this signs that my burner is failing?

      • junebeetle says:

        Are the CD’s scratched or damaged? I find that this error also occurs when a file can’t be read because the physical media is damaged. A solution that I found was to use

        cp -R /path/to/damaged/folder /an/external/hard/drive

        It did not successfully copy everything, but unlike Finder it did not stop when it came across a bad file. It displayed which files it failed to copy as it went, also.

      • Ctates says:

        I have the same problem!!!

        My Cd-R’s are in perfect condition and have been stored properly. They were all burned in 2007 and 2008.

        I am transferring old images from CD-R’s to an external hard drive and I get this error on my mac – “The Finder can’t complete the operation because some data in “IMG_8834.JPG” can’t be read or written.
        (Error code -36)”. The error occurs usually part, mid or towards the end of transferring a folder of images. Some folders go through without an issue, most don’t.

        Note, I only receive the error on Imation CD’s. I’ve been transferring from Sony, TDK and Memorex without issue. Some Imations give me no trouble, but most do. I borrowed a friends mac and got the same issue however I was able to get a few extra photos before ether error occurred.

        Also, when I put my CD-R in and search it up on disk utilities, my repair disk option (first aid) is grayed out so no go on the disk repair.

        What to do

        • Ctates says:

          Got a fix for people with a similar issue!!! Originally, I burned all images to CD-R’s using a Windows based computer (non-mac) and decided yesterday to try to copy images from an old Dell. Well, it worked perfectly and I have transferred all images no problem to an external hard drive. The issue would appear to be my Mac having difficulty reading the Imation CDs. I borrowed a friend newer mac (2014, compared to my 2011) and the same issue occurred, except I was able to get a few more pictures from the newer computer than my own.

      • Ctates says:

        See my reply below. Hope it works for you!

  23. ywpt says:

    If you are getting the error while you are copying things to external NTFS drive, try to mount the drive in Windows and remove the the Mac specific files. In case you run into difficulties, you may need to run check disk to clean the drive and you can run it from command or from the Drive properties toolbox on Windows.

  24. Aaron says:

    So I can’t do the dot clean to fix a file that’s on a mounted disk? The file that is giving me the error when I try to move it is on my main drive. I’m trying to move it to an external…

    • Bjorn says:

      Having the same problem… I want to move a 50Gb Final Cut Pro library to an external harddrive to free space, but after copying around 2Gb it shows “error -36”.
      I don’t get anything to work with the description above using the “dot_clean” function.. or I’m missing something?

  25. Ken says:

    This worked for me! Thanks so much!

  26. Victor Dragono says:

    Hi there,

    Please advise and help for the following issues. I want to copy from USD to MAC. its show error-36. I try to follow your guide solving this issues. the problem is idk what is ‘Path’, ‘To’, ‘Directory’, ‘With’, ‘Problem’ in my mac since i am not familiar with computer as i am only user.
    please advise if you can help me. thank you.

    best regards,
    Victor Dragono

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates