Subscribe to MacYourself via RSSSubscribe to MacYourself via EmailFollow MacYourself on Twitter
Mini DisplayPort to HDMI adapter
Kanex HDMI Products for Mac

Solution to Finder “Error code -36″ in 10.6 when copying folders

Solution to Finder

Users of Mac OS X Snow Leopard, specifically those running 10.6.2, are experiencing a widespread problem related to copying directories to Windows-formatted volumes in Finder.

I recently got a new USB flash drive and ran into a serious issue as I was loading it with data. Some of the files I temporarily copied to my Mac’s Desktop from my old flash drive would not successfully copy to the new one. Both flash drives were formatted as FAT volumes (known as MS-DOS in Disk Utility) and only files that resided in a folder seemed to be affected. I could copy the files individually just fine, but not an entire folder at once. Finder would have none of it.

If you’re running Mac OS X 10.6.2 and have a MS-DOS/FAT-formatted disk handy, here is a quick way to replicate the problem.

  1. Create a new folder on the MS-DOS drive with Finder and copy any file from your Mac right into that folder. It could be anything… I used a random image on my Desktop, for example.
  2. Copy the entire folder from the MS-DOS drive to your Mac’s Desktop.
  3. Copy the folder from your Desktop right back onto the MS-DOS drive.

Boom! You just got slapped with the following error, didn’t you? “The Finder can’t complete the operation because some data can’t be read or written. (Error code -36).” Every time, without fail, this has occurred on all Snow Leopard machines I’ve tried. Sure, you can reformat the USB flash drive to Mac OS Extended to get around the error, but that kills Windows compatibility. Instead, let’s dig deeper.

It turns out the problem stems from the “dot-underscore” companion files that Mac OS X’s HFS+ filesystem creates for files when they get moved to FAT16 or FAT32 volumes. These hidden files – which start with “._” followed by the original filename – contain extra information to go along with the main file’s data. Apparently things get screwy in 10.6.2 and don’t go well when folders from a Windows-compatible volume get moved to a Mac and then back again. The dreaded “Error code -36″ message is the result.

If you run into this horribly inconvenient bug, there is a temporary solution until Apple gets their act together. It involves stripping the main file of its unneeded dot-underscore buddy. Don’t worry, you won’t lose anything important in the process. Here’s what you can do:

  1. Launch Terminal (Applications > Utilities) and type the following command, making sure to include a space at the end:

    dot_clean

  2. Select the folder on your Mac that is giving you trouble and drag it right to the Terminal window. A green cursor with a + symbol should appear before you release the mouse.
  3. The path to that folder should have automatically appeared at the end of the Terminal command. For example, it might look like:

    dot_clean /Users/UserName/Desktop/Test_Folder

  4. Press Enter/Return to run the command. It will appear as if nothing happened, but try copying that folder to a MS-DOS volume now. Finder should magically allow it to be moved with no problem!
  5. Repeat the entire process as needed for other folders that won’t copy.

As you can see, this is not necessarily a major file or disk corruption issue. It is a pesky Snow Leopard bug that Apple will hopefully fix in the upcoming 10.6.3 update. In the meantime, this will allow users to copy and move files between drives as needed.

UPDATE – 4/4/10: Apple’s 10.6.3 update has indeed finally fixed this bug! If you installed the update and are still experiencing a Finder error, it’s likely you are suffering from a different issue that is beyond the realm of this article.

Share/Save/Bookmark
Share/Save It
Digg ThisStumbleUponDel.icio.usTwitterFacebook

99 Comments Have Been Posted (Leave Your Response)

Thank you so much!! This has been happening to me for weeks and I had no idea what was going on. My thumb drive is happy again!

Thank You! This has been bugging me for so long!

I’m seeing this problem when I try to copy (large) files to an external drive that’s formatted as Mac OS Extended (Journaled). When I use the drive on an OS X 10.5 system, it works fine. It fails only on my 10.6.2 Mac.

I’ve reformatted the drive, and the problem persists.

Any possible explanations for this?

The dot_clean command is recursive so you don’t have to do each folder. So it’s really easy to use…

Thank you very much … certainly this problem appeared when Snow Leopard is updated to version 10.6.2 … until today, when I read in (http://discussions.info.apple.com/thread.jspa?threadID=2231572&start=90&tstart=0) solution that directs me here … thanks again for the solution clearly and accurately.

sorry to say it didn’t work, after entering the dot_clean command and trying a file, the terminal gives me the response
” -bash: /Users/Car/icons/Adobe CS4 Icons: is a directory ”
and the finder error still persists

thanks a lot for the tip. That’s great.

Thank you so much. Your explanations were simple and straight forward. I’ve subscribed to your page and look forward to learning more!

It works! thanks for the help.

Well..I did that..and the problems persists…I cannot copy the folder to the external drive..any other solution?

Wow…thank you thank you and thank you. I have been wrecking my brain on this for at least a few days now. Now finally found the solution that works.Just to clarify.
After lunched terminal, type “dot_clean ” Make sure you have space after the word dot_clean. Then drag the folder into terminal window and hit enter. Thanks again.

I can’t believe they haven’t fixed this yet. You’d think they might have snuck it in the security update last week.

Couldn’t not being able to back up files be considered a security issue?

This has been happening to me since August when I updated the OS to Leopard. I can’t thank you enough for your kind help.

This doesn’t work for me. My hard drive is formatted as Mac OS Extended (Journaled). I backed up my entire iTunes collection so that i could clean install Snow Leopard and now i can’t get it of the hard drive. The clean doesn’t seem to do anything.
As you can probably understand this is driving me crazy as i now have no music. Does anyone know any other solutions?

Legend! Been trying to figure this out for ages!

Also, following on from Oats post above you can select multiple folders and drop in to terminal, will still work.

ANT….you are the MAN!!!!
Thanks a lot, i thought i was loosing my mind and my job!!!

God bless you for digging deeper!!

THANK YOU SO MUCH THIS IS SO HELPFUL!!!! Finally able to clear away those ._ files and it Fixed the error code -36 issue I was having

This hasn’t worked for me sadly. I can back up from my iMac, transfer same files to my macbook, but when I try & back up again from the macbook then I get the error message. Both are on 10.6.2, only difference is that iMac came with it, macbook upgraded from 10.5 where this wasn’t an issue. Please please help.

FANTASTIC !!!!!!!!!
Fixed, done, easy

You are the best !

Thanks Ant! You are a deadset legend – Full Stop

Thank you, Masked Man!!

It works for:
error code -36 <–As you describe above. (It fixed a problem I had last month.)
error code -35 <–I gave it a shot … it seemed to work. (With a funny error message … which i ignored.)

Both, while trying to copy large files on/off a Windows formatted thumb-drive. (there is probably a more technical description for what happened. I don't care. It works now.)

Thanks again.

For the people having issues with this, if there are ANY spaces in the path to the directory, what you see after you do the drag into terminal, it won’t work.

For example, this:
dot_clean /Users/Car/icons/Adobe CS4 Icons
won’t work.

You need to escape those spaces, like this:
dot_clean /Users/Car/icons/Adobe\ CS4\ Icons
note the backslash before the space.

Thanks for this it explains why I can’t read files/folders on my FAT formatted NAS box. do you have any idea how I get round the fact that I can’t read anything on it now (the NAS box), unless I copy it back to my iMac’s drive?
I tried your fix, but as soon as I copy it back to the NAS box, the same Error -36 rears it’s ugly head again.

THANKS!!! SAVED US A LOT OF TIME MOVING ITUNES FILES TO A HARD DRIVE!

Thanks…It worked great.

Thank you very much! This works great!

Awesome, cheers man, this has been driving me crazy, this will keep me sane until the updaye! Good work.:)

This isn’t working for me, I’m trying to copy a few 6-8GB DMGs. It gives me the -36 right at the end of the copy. I tried running dot_clean on the parent directory of the DMGs and the DMGs themselves – no avail.

Thanks. This worked perfectly.

thank you so much, works perfectly!

I’m having the same issue as Car. When I attempt to use dot_clean, Terminal responds “/Users/James/Desktop/iTunes Music: is a directory”

Also, I checked to make sure that the spaces in the directory name were being escaped per another comment, and they are. Here’s exactly what goes on in Terminal:

James-Likeness-Mac-Pro:~ James$ dot_clean
usage: dot_clean [-fmnpsv] [--keep=[mostrecent|dotbar|native]] [directory ...]
James-Likeness-Mac-Pro:~ James$ /Users/James/Desktop/iTunes\ Music
-bash: /Users/James/Desktop/iTunes Music: is a directory

Does anyone have any idea what I can do? I’ve isolated the error to being directory related – I can transfer files over without problems. Thanks!!

If the error occurs when trying to copy files to a flash drive, it is also possible to repartition the drive in Disk Utility – this wipes out everything, so don’t use this technique with flash drives when you want to retain existing content on that drive.

I LOVE YOU!!!!!! THANK YOU!

THANK YOU! This worked for me, and I’m pleased.

Thank you so much. I’ve been pulling my hair out for the last couple of days. You’ve really made my week-end! Thanks again.

Thank You Very Much! Couldn’t have said it any clearer/better. Thanks again! Wooohooo!

THANKA!

Lost a lot of time on this till the fix here.

Can’t believe Apple let such a bug be.

Bad Pathname: Not a directory
undouble /Users/anoukdc/Documents/Microsoft User Data/Archief/Soko – I’ll Kill Her kopie.mp3 failedMacBook-Pro-van-Anouk-DC:~ anoukdc$

^I always get this message. Doesn’t work for me.

NOOK,
It looks like you dragged a file into Terminal instead of a folder. This only works with folders/directories.

Thanks so much…. Worked perfectly

Thank you so much! I tried other “fixes” and they didn’t work. This worked! You just saved me tons of time in work-arounds!

Thank-you THANK-YOU!

I’m seeing a similar issue with copying folders from OS X 10.6.2 client to a Windows file share, except it’s an error -50. Any chance this might work?

Hmm, no workee for me unfortunately. I am trying to copy files out to a normal Mac volume, an external hard drive that I believe to be in good condition since I can format it writing zeroes and everything, no errors reported. But whenever I try to copy something out to it, using 10.6.2 Snow Leopard, I get a most unwelcome error -36. :(

thank you very much for sharing.
u the man.

DZUL NAJMI SIROZI
March 7th, 2010, 5:15 AM

this is really helpful .. thanks for showing this tips ..

Thank you very much. Need PC compatibility for work.

This is just one in a long list of problems I have experienced with Snow Leopard… Really wish I had never upgraded!!!

Thanks again

works! thanks ant… there are times you just really have to hate apple!!!!

THANK YOU! This totally solved my problem. Backing up right now.

James Likeness and Car, the problem you’re having is a result of hitting enter after your dot_clean. Just type in “dot_clean ” and DO NOT hit enter. Just drag the file so that it enters the path, and THEN hit enter. It should look something like
COMPUTER:desktop Shin$ dot_clean /Users/Shin/Desktop/File
and then you’ll get a standard
COMPUTER:desktop Shin$ as a sign that it worked [I suppose. I'm still getting the -36 error, so i suspect mine is a result of something other than the ._ files.]

This didn’t work the first few times I tried it but then I realized there was a space at the end of my folder name. When I deleted the space, it worked!

Thank you for making it simple for the New Mac users.

I had to reformat the drive that had all my photo’s on it, (Windows issue), thinking to be clever and copy them onto the Mac first, and than came across the error code when I tried to copy them back. I thought I would die as it was about 4 years worth of photo’s.

So again thank you for solving this issue:)

Thank you so much, you are great and it works perfectly.

Amazing. Worked perfect. Thanks.

Words can’t describe how thankful I am. I was about to lose more than 200GB of important files when I found your simple and clever solution. Thank you so much!

Yesss!! Its work.. Thanks you..

Awesome, works perfectly. It was driving me insane!!! Thank You

wellI can copy files and folders now.. but cannot save, half he word/excel files changed to unix exe files that I have to manually rename to get to work. :/

Thanks a lot buddy! This helped me like anything when critically needed! Thumbs up :)

A big thank to the solution. This bug has been annoying me fors months. I’ve tried every possible solutions I could think of but with zero success until today. Thumbs up !!! :D

Thank you! I had a school project and when i tried to put it on a drive i had no idea what was going on.

OMG best fix ever. How the hell did you find it??? You’re a genius

This worked perfectly for me once I updated the file path to eliminate any spaces (just renamed the top level folder). It worked recursively across 4 levels of subfolders for 100 Gigs of music. Thank you sooo much.

Gotta love the web

Thank you very much for this. Been snooping around trying to find a fix for this, and this helped me make a back up of my iTunes Music Library onto my External HD. Cheers.

THANK YOU THANK YOU THANK YOU!!!! …..Did I say THANK YOU?!?

You just saved me soooo much grief.

Man! Thank you so much! I reinstall my MacOS a lot of times… You save my live! Thank you!
PS: Sorry, I know my english is terrible… I’m never study english… rs

Thank you so much, like others I have been wrecking my brain trying to figure this out and thanks to you now I know. It is so great having you around to solve those mystery problems. Thank you, thank you, thank you!

Fixed in OS X 10.6.3. From the official changelog:

“an issue in which the Finder reports a -36 error when copying directories to a drive formatted as FAT32.”

Confirmed fixed; no more such troubles in 10.6.3

Works in 10.6.3 for NEW files that are copied over and back.

BUT I can’t seem to copy over any existing files from XP. I still get the -36 error.

It’s not fixed, also this doesn’t work.

Still doesn’t work. Running 10.6.3 on both my Macbook Pro and iMac. The iMac has a 1.5Tb external FW800 drive attached to it, which is also formatted same as the other two (Mac OS Extended). I want to put a copy of my iPhoto library on the FW drive. I’ve run the dot_clean command with no space (I just drag over the folder Pictures to the Terminal window after the dot_clean command) several times. Executes with no errors or messages. Then when I try to copy the iPhoto library to the FW driver, I get the same −36 error, with a message that something can’t be read or written. Super annoying. How do I make a backup copy to another device?

The new update (4/4/2010) did not fix it for me. I’m having troubles copying onto a windows FTP server through WEBDAV.

thx for sharing!!

I’ve been having the error code 36 for a while now…I tried the dot clean method- unsuccessful. I recently downloaded the 10.6.3 and the files still didn’t transfer.
I called Apple Care! Finder-Go-Utilities–click on indented ‘My Book’ then click Repair Disk..then click Verify Disk….and then magically I could transfer my files back to hard drive. Hope this helps! Wish I had called Apple a long time ago.

Dubious solution. Happens on all flash media, not just those formatted in FAT. I get it on my GUID Air all the time. Its basically made network transfers between the Air and my other Mac’s impossible without an intermediate step to transfer to an external first.

It works, but the problem is that if you want to move back the folder (or any file inside) at the primitive site (to a HD HFS+), the same error 36, don´t let you do it.

Its like if the file could have inside the DS_Store.

Solutions?

I had this error under 10.6.3, but your fix fixed it… Probably the new update will stop it happening again, but didn’t fix existing instances of this problem.

Thanks.

The problem is with my external HD box. It doesn’t work.

thanks!!! this worked for me

I got this error whilst trying to copy a large file (27Gb) from one MacBook to another over the network. Both MacBooks are running 10.6.3 although the source MacBook was built circa Jan 2008 and the target is brand new. It repeatedly failed after transferring around 400Mb with the error: “The Finder can’t complete the operation because some data can’t be read or written. (Error code -36)”

The solution turned out to be quite simple. I was trying to use SMB to transfer the files. Simply changing to using AFP allowed the file and an even larger one (32Gb) to be transferred successfully.

It seems there is a fundamental problem with Microsoft-based file storage/protocols…

I’m getting the error when trying to pull at Quicktime file off a data DVD to my desktop. I am running OSX 10.5.8. Several times, it got to the very end before it gave me the error. Other times, it says it right away. Always, it freezes up my finder and I have to force quit.

Any ideas?

I still get this error regardless of the update and such. it works when i have it in the other formats but i need it in Fat32…could the HD be done for?

The problem remains. I’m trying to transfer a .mov file made in Final Cut (so let’s leave Microsoft alone in this case). The external drive I’m trying to copy from is formatted MacOS Extended (journaled), so no FAT32 issue. Tried switching firewire to usb, using Terminal, repairing the disc, etc. The file is fine – I can run the Quicktime file from the hard drive, but I need to copy it,not watch it. Apple’s response to this problem ( “bummer,” it says on their help site) is so arrogant and unhelpful that I think it will make me get an Android phone this week. Any more suggestions from anyone? I need to present this movie, and this problem, which Apple basically laughs at, makes all of my work useless and endangers my career. My MacBook Pro is so sexy,but it fails me when it matters. Please help, so I can repair my relationship with my computer. Thanks.

Odin,
Since your issue does not involve a FAT-formatted drive, you are experiencing something unrelated to the problem this article covers. But I’ll try to help anyway. Is this the only file you’re having trouble with? Have you tried duplicating the file (Cmd + D) and then moving the duplicated file to the external drive? Or maybe copy the file to a different external drive, then copy it again from there to the drive you want to put it on?

Have you tried calling AppleCare or visiting an Apple Store? I wouldn’t take anything on Apple’s support discussion boards as a real response from them.

Update: I ended up recapturing the original tapes and re-rendering the whole project, since transferring my rendered files appeared to be impossible. Time wasted, but there was real danger of wasting even more time on an issue that shouldn’t exist in the first place. Now I’m not sure whether I can trust my Mac as a movie-editing machine, since large files are in jeopardy. I’m in a bad mood about my mac. Style is not enough.

Thanks, Ant – I didn’t see your suggestion until the page refreshed with my latest snarky comment. First, sorry – I now see that my comment is a bit misplaced in this forum. Confused after searching wide for a solution. I did try your suggestions, which unfortunately didn’t work for my problem. My past AppleCare experience wasn’t useful – the expert gave up, and a non-expert friend later helped troubleshoot and fix the problem. No time to go to the distant AppleStore with a project due. The problem was solved, though, the hard way. Again, thanks for the response.

Ive been reading lots of these but for me it’s not helpful….I dont know how to do the dot_clean, im been trying to analized on how to do it….its better for you , for those successfully did it and it works….kindly post a step by step instruction with a print screen copy for us a new MAC users…thanks

If you are STILL having this problem after 10.6.3 like me the problem is probably to do with the ‘com.apple.ResourceFork’ extended property on the file.

To see if this is the issue do a ‘ls -l’ on the dir in question and see if any files have an ‘@’ symbol .. if so the file wont copy to windows OS.

To remove:

cp -rX

i’m stuck with this problem even after the recent update.
its very frustrating.
if i take this to my local apple store
would they be able to fix it without cost? thank you
a rookie mac user Calvin

Actually, that is not the problem. I tried your fix, it did not work in my case. What does work, go in to your Terminal, cd to the directory and remove the hidden unix file .DS_Store with the command “rm .DS_Store” you can look at the file with the command “ls -a” … one you remove that file, you can then copy over the directory.

Thanks for the tip. Saved me some frustration as I thought I’d lost some important work files. All good in the ‘hood now, though.

It’d be great if you could put the update at the top of this article, instead of at the end, as if you’ve already updated then going through the steps is a bit of a waste of time…

THANKS! …thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you !!!

Thank you! You’re “the Man™”… Saved me a lot of headaches…

That did it! Thanks for the great help. Also, I didn’t read the whole thing, but in case you didn’t mention it, you can clean multiple folders/files at once. Just drag them all into the Terminal window after dot_clean(space).

This is bullshit… your solution is great ONCE. But doing this everytime I want to copy something is a pain in the ass. Apple should do something about it

OH MY GOD! i was seriously sitting there thinking this is some sort of nerd trying to make up crap to get people excited but it actually worked! thank you so much. you’re a life saviour as i only have 1 day to print my photos before I leave to move overseas and today was my last chance to do it :D thank you!

I hate this so much. I HAVE to back up to my external, but NOTHING works. Often I don’t even get the error 36 message. The copy window just freezes and I can’t quit it or stop it, all I can do is force shutdown my macbook. My external is partitioned – one is Mac OS Extended and the other one obviously FAT, where the problem is. In disk utility, when clicking on Info, it tells me there are no files on the drive (although there are, and 150GB is used) and on the Mac partition (which is empty) it says there are 115 files! WTF? I hate steven jobs

Have Something To Say? Join The Discussion!

  (required)
  (required; will be kept private)
  (optional)