Can't empty trash because 'Error code -36'


BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
Hello there. I wonder if anyone can help stop me from pulling my hair out?

I tried to move a bunch of about 500 photos and a few iPhone videos onto my Western Digital external hard drive. For some reason they wouldn't just slide across. I found that it worked if I moved one photo to the desktop first, and then to the folder on the EHD. So I tried doing that with all of the photos. Big mistake. It was taking AGES to move them from the desktop to the EHD, so I stopped that operation and instead put them all in the trash and turned everything off then drank wine and went to bed.

This morning I thought I'd have another go. First up: empty the trash. I found that I can't because of 'error -36'. The photos can't be 'read or written' so they're not being deleted. I tried googling the problem, which led me to try the Terminal feature. That took a while and didn't work either.

Is there anything else I can try? I'm using Sierra 10.12.6. I can't write code and try not to delve too deep into my Mac's inner workings. I am but a poor writer. Any help would be very welcome.

Kevin
 

Attachments

Ad

Advertisements

Spawn_Dooley

Moderator
Joined
Jun 13, 2007
Messages
2,855
Reaction score
93
Hi, you can try the script that's found on the linked page from the forums here, put together by our own Walrus666

https://www.mac-help.com/threads/101-snippets.313/#post-18939

It's called 'ForceEmptyTrash' & you'll find it in Post#18

The zip file will download & just double-click the zip to open it then double-click the file to open it in Script Editor. Click the play button to run it & your Trash should empty.
 
Last edited:

BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
Thanks. Trouble is, this:
try
do shell script
"rm -r ~/.Trash/*" with administrator privileges
on error error_message
beep
display dialog
error_message buttons {"OK"} default button 1
end try

...is Greek to me. I haven't a clue where to start.
 

Spawn_Dooley

Moderator
Joined
Jun 13, 2007
Messages
2,855
Reaction score
93
just press the play button in the Script Editor window to run that script ...
 

BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
I spoke too soon. Next time I look, the Trash has the same contents back again. The only one that isn't a photo is a Text document called 'iNode4357836'. This is getting ridiculous!
 
Ad

Advertisements

Spawn_Dooley

Moderator
Joined
Jun 13, 2007
Messages
2,855
Reaction score
93
can you create a new folder on the desktop & then drag the Trash's contents into this folder?
 

BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
Yes, but then they double up, with one set in the desktop folder and the other remaining in the Trash.
 

Spawn_Dooley

Moderator
Joined
Jun 13, 2007
Messages
2,855
Reaction score
93
Oooops, try Select All in the Trash then press Command C then go to the folder & press Option Command V
 

BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
More information that might help. As I mentioned, I tried to move loads of photos onto my external hard drive. Those that did transfer show the same symptoms as those in the Trash. They can't be moved into the Trash because of the error -36.

Ah, right, I'll try that. Thanks for being patient!
 

BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
No, it's not having it. I'm just getting twice the number of undeletable files and folders.

I COULD reformat the EHD but then I'd lose all the photos that reside there and nowhere else.

So there are files in both the trash and the EHD, and now on the Desktop, that just don't want to be deleted.
 
Ad

Advertisements

BraveNewMalden

New Member
Joined
Jul 17, 2008
Messages
19
Reaction score
0
Aha! See what you're getting at. I unplugged the ext HD and the trash is suddenly empty!

So it's the ext HD that's the problem, or rather the corrupted files on it.

I'm trying to use Terminal and the solution you pointed to right at the start, i.e. typing 'sudo bash', 'rm -rf' etc, then dragging photos from the ext HD into Terminal.

But each one shows up like this:
rm: /Volumes/EXTERNAL PHOTOS HD/IMG_7863.jpg: Input/output error

I'll let it run its course, then reboot (after unplugging ext HD) but don't hold out much hope.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top