Need help with an error code-50

When I bought my new Mac recently, I transferred everything over. I want to delete a couple of files - basically screenshots and some images from who knows how long ago. They are on my desktop. When I try to delete them, I get this message: The operation can’t be completed because an unexpected error occurred (error code -50). Anyone know how I can delete these several items??

MacBook Pro (M2 Pro, 2023)

Posted on May 28, 2023 11:25 AM

Reply
15 replies

May 29, 2023 06:39 PM in response to Grant Bennet-Alder

Darn. When I dragged the file (a jpeg image), it would not drag to the terminal window. It would drag over to the window and then when I let go, would bounce back to its original spot. I am going to include a screenshot of these files I want to delete, there are several and they are all images. These items on my desktop won't even move,

if I wanted to tuck them in a folder somewhere, I can't. I can't even move them to the other side of my desktop.

Do you think they won't delete because they were originally files on a different computer??

May 28, 2023 03:33 PM in response to Grant Bennet-Alder

ok, here is more detailed info...

I have about 5 separate screenshots or images just sitting on my desktop. They were stuck on my desktop when I owned my last Mac. I would try and drag them to the trash and get an error message, even if I drug them to the trash separately. When I got my new Mac, I just moved everything over and these images or screenshot files were still on my desktop of course on the new Macbook Pro. When I drag them individually to the trash, I get the error code mentioned above. If I try and open the items, nothing happens. I have also tried to delete them. I have looked at the "Get Info" on the files and they are either jpeg or peng and one is a HEIC. The files are not locked - I checked that.

May 29, 2023 07:23 AM in response to LDCoolG

You said these are on the desktop, right?


There is a way to force-remove using Terminal and Finder working together. Terminal commands are like a box of VERY sharp tools. You never just reach into the box, or it will cut your fingers.


Open a terminal Window;

type this command and leave a space at the end, and don't press return yet:


rm -f  

open a Finder window.

drag the difficult file to the Terminal Window.

This does not move the file, it copies the long directory reference to the file into the Terminal window.

that long file reference will appear after the space at the end of the rm -f terminal command.

press return, and the file should be gone.


What you are doing is telling Terminal rm -- remove this referenced file, and -f, force its removal, I really mean it followed by the directory reference to the file provided by Finder.

May 30, 2023 05:26 AM in response to LDCoolG

in Terminal, enter this command to list (the names of the files) in the current-user Desktop file, where tilde [~] is an active shorthand for "current user'. Each letter of -ale are flags that add displayed attributes to the output.


ls -ale ~/Desktop


You will get a MacOS dialog box asking if you want to allow Terminal to access files on your desktop. Allow and enter your Admin password if a password is required.


please copy and paste the text of the results.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Need help with an error code-50

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.