Mac error code 36 when copying or deleting files: how to fix it
Error -36 means macOS could not read or write some data. Fix it with dot_clean, find the one bad file, and check the drive and cable. Tested on macOS 26.
- Error code -36 is an input/output error: macOS could not read or write part of a file during a copy, move or delete.
- On USB drives and SD cards formatted for Windows, the usual cause is the hidden ._ files macOS creates; run dot_clean on the folder or drive to merge them.
- If one file keeps failing, copy the folder in Terminal with cp -Rv to see exactly which file it is, then skip or replace that file.
- Repeated -36 errors on the same drive point to a failing drive, cable or port, so run First Aid in Disk Utility and copy important files off.
What error -36 means#
The full Finder message reads something like:
The Finder can't complete the operation because some data in "photo.jpg" can't be read or written. (Error code -36)
Code -36 is an input/output (I/O) error. Somewhere between the file, its hidden metadata and the drive, macOS asked to read or write some bytes and failed. It shows up most often when copying to or from USB sticks, SD cards and external drives, and sometimes when deleting from them.
There are three usual causes, from most to least common:
- Damaged
._files on drives formatted for Windows (FAT32, exFAT). - One damaged file that cannot be read.
- A failing drive, cable or port.
Fix 1: run dot_clean on the folder or drive#
Mac files carry extra information such as tags, Finder comments and quarantine flags. Drives formatted as FAT32 or exFAT cannot store it, so macOS saves it in a hidden companion file whose name starts with ._, for example ._photo.jpg. If that companion file is damaged, copying the real file fails with error -36.
dot_clean is a tool built into macOS that merges those ._ files back into the real files. Open Terminal and type dot_clean with a space, then drag the folder or drive from Finder into the Terminal window so the path is filled in, and press Return:
dot_clean /Volumes/USB_DRIVE
By default it keeps the most recent information and removes nothing you need. To clean only ._ files that no longer have a matching real file, add -n:
dot_clean -n /Volumes/USB_DRIVE
Then try the copy again. On drives full of photos copied between Windows and Mac, this alone fixes most -36 errors.
Fix 2: find the one file that fails#
Finder stops at the first error and does not always name the file. Terminal copies file by file and prints each one, so you can see exactly where it breaks:
cp -Rv /Volumes/USB_DRIVE/Photos ~/Desktop/Photos-copy
The last line before the error is the file that cannot be read. Copy everything else, then try that file again later, re-download it, or accept that it is damaged. -R copies folders, -v prints each file.
Fix 3: run First Aid on the drive#
Errors in the drive's file system cause I/O errors too. Open Disk Utility, select the drive in the sidebar (choose View › Show All Devices to see every volume), click First Aid and then Run. Apple describes the steps in Repair a storage device in Disk Utility.
Fix 4: change the cable, port or adapter#
Loose or cheap USB-C hubs, long cables and worn SD card readers cause errors that look like file problems. Plug the drive straight into the Mac with a different cable, and try another port. If the error disappears, the drive was fine.
Fix 5: copy everything off, then reformat#
If the error happens on different files each time or the drive disconnects by itself, copy what you can and stop trusting the drive. To keep using it, reformat it in Disk Utility:
- APFS if only Macs will use it (no
._files at all). - exFAT if it must also work on Windows (the
._files come back, so repeat Fix 1 now and then).
Reformatting erases everything on the drive, so do it only after your files are safe.
Don't delete every hidden file on a drive with
rmto "clean" it.dot_cleanmerges the metadata safely; deleting by hand can remove files you need, including on the Mac's own disk if the path is wrong.
Related problems#
If deleting from the drive fails with "item is in use" rather than -36, see can't empty the Trash. If you are copying files off because the Mac is out of space, the storage checklist may free enough room to keep them where they are. More Finder fixes are on the Files & Finder page.
FAQ
What does error code 36 mean on a Mac?
It is a general input/output error. Finder shows it as: some data can't be read or written. The data, the hidden metadata next to it, or the drive itself could not be accessed.
Is dot_clean safe to run?
Yes. By default it merges the information from ._ files back into the real files instead of deleting it, and it never touches the contents of your documents. It is a built-in macOS tool.
Why do I get error 36 copying to a USB stick?
USB sticks and SD cards are usually formatted as FAT32 or exFAT, which cannot store Mac file metadata directly. macOS writes it in ._ files instead, and a damaged ._ file stops the copy.
Can error 36 mean my drive is dying?
It can. If the error happens on different files, gets worse over time, or the drive disconnects on its own, back up what you can and replace the drive or cable.
Sources
- Oct 12, 2026: First published. dot_clean options checked against its manual on macOS 26.3.