Finder fixes and how-tos
Error -36 means Finder hit a read or write failure partway through a copy. Here is how to tell whether hidden ._ files, the drive, the connection or one damaged file is to blame, and what fixes each.
Error -36 is the old Mac OS code for an input/output error. Apple's own header file names it ioErr. Finder shows it like this:
The Finder can’t complete the operation because some data in “Holiday.mov” can’t be read or written.
(Error code -36)
Finder asked a disk for part of that file, or tried to write it, and the request failed. The file in the message is the one that broke the copy, so start with it.
Quickest fix to try first: if either end of the copy is a USB stick, an SD card or a network share, run dot_clean on it (below, after copying off anything you can't replace) and copy again. If the error comes back, copy that one file in Terminal, which tells you what actually went wrong.
Finder only gives you the number. The cp command reports the underlying error by name. Type cp -v , drag the file from Finder into the Terminal window (that pastes its path, with spaces escaped), then add a destination:
cp -v "/Volumes/<DriveName>/Videos/Holiday.mov" ~/Desktop/
What the result tells you:
| What Terminal says | What it points to |
|---|---|
| The file copies without complaint | The data is readable, so the disk is probably not the problem. Suspect the file's Mac metadata: the ._ file problem below. |
Input/output error | The disk couldn't read that part of the file. Suspect the drive, the cable or port, or the file itself. |
Operation not permitted or Permission denied | Not a read failure at all: permissions or macOS privacy settings are blocking the copy. |
If the file copies fine in Terminal, you already have your copy. The rest of this page is about stopping it happening again.
Drives formatted for Windows (exFAT or FAT32) and many network shares can't store the extra information a Mac attaches to files: tags, Finder comments, the quarantine flag and other extended attributes. macOS keeps that information in a hidden companion file instead, named ._ plus the file's name. You won't see them in Finder, but ls -la in the folder shows them.
When one of those companions is damaged, or no longer matches its file, Finder can fail with -36. The fix that's suggested most often in Apple's forums is dot_clean, which ships with macOS. Its manual page describes it as merging ._ files with the files they belong to:
dot_clean -v "/Volumes/<DriveName>"
-v prints what it does. Point it at a folder instead of the whole drive if you only need one folder fixed. Adding -m tells it to always delete the ._ files. Plenty of people report that dot_clean cleared the error for them and others say it made no difference, so treat it as a likely fix, not a guaranteed one, and have a copy of anything irreplaceable on the drive first.
To check the drive's format, select it in Finder and choose File > Get Info, or run diskutil info "/Volumes/<DriveName>" and look at the File System Personality line. ExFAT or FAT32 (Disk Utility calls it MS-DOS (FAT32)) means ._ files are in play. There is more on these hidden files in Hidden macOS file behaviours worth knowing.
If you don't need the metadata, you can also copy without it. The -X option tells cp not to copy extended attributes or resource forks, so the copy carries no metadata for a ._ file to hold:
cp -X "/path/to/Holiday.mov" "/Volumes/<DriveName>/Videos/"
You lose the file's tags and Finder comments on the copy. The contents are unchanged.
If Terminal said Input/output error, the problem is lower down. Work through the cheap checks before blaming the drive:
If you're checking your startup disk, Apple says to run First Aid from macOS Recovery. And if Disk Utility reports that the disk is about to fail, Apple's advice is to back up what you can and replace it. Errors on many different files from the same drive point the same way. Copy off what matters before you run anything else on it, and see what to do when USB drive files disappear if files have already gone missing.
If the same file fails every time, from every drive and every port, while other files copy fine, the file itself is probably damaged. Try opening it in its own app. A video that stops partway or a document that won't open confirms it. You can't copy your way past a damaged file; you need another copy of it: the original download, the camera's card, an earlier export or a backup.
A file big enough to fail a copy has often been saved more than once: an export, a download, a backup drive. In Everywhere, type part of the file's name, select it and press ⌘D to list every other copy it knows about, including copies on drives you've catalogued and since unplugged. External drives only appear in the index after you give Everywhere Full Disk Access, so grant that first if the copy you want is on a drive.
It is the input/output error code: Finder couldn't read or write some of the file's data. Common causes are hidden ._ files on an exFAT or FAT32 drive or a network share, a failing drive or connection, and a damaged file.
Run dot_clean -v "/Volumes/<DriveName>" in Terminal and copy again. If it still fails, plug the drive straight into the Mac with another cable, then run First Aid on it in Disk Utility.
Not always, but it can. If Terminal's cp reports an input/output error on many different files from the same drive, copy off what matters, run First Aid, and replace the drive if Disk Utility says it is about to fail.
Deleting them removes the Mac metadata they hold, such as tags and Finder comments, but not the main files' contents. Running dot_clean is the tidier route because it merges them with their files first.
Everywhere keeps track of every file on your Mac, including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised