How to fix unexpected error -50 in OS X when deleting or moving files

Despite its user-friendly interface, OS X sometimes gives no more information than an error code when something goes wrong. One of these is error code -50, which may occur when you attempt to copy, move, or delete files from external hard drives. If this occurs and you are stuck with a file you cannot manage, then you can likely overcome this error with a few possible approaches.

1. Check your drive with Disk Utility

First, ensure the drive’s formatting is OK, by using Disk Utility to run a verification routine on the storage volume that contains the file. To do this, select the volume in Disk Utility’s sidebar, and then go to the First Aid tab and click Verify Disk. If any errors show up (text in red), then use the Repair button to fix them.

2. Unmount and re-mount your drive

As a general and less-intrusive approach, you can also try ejecting your drive, followed by unplugging it. Then reboot your system, and then plug your drive in again. When it mounts, try managing the file on it.

3. Rename the file

One quick solution to this problem, suggested by MacIssues reader Matt, is to try renaming the file. Give it a general name like “myfile.txt” and confirm that you want to change the file extension (or even remove it). Then attempt to move or delete the file using the OS X Finder, and hope for success.

4. Use the Terminal to manage the file

The Finder moves files using more checks and restrictions that Terminal commands, so you might have better luck moving or deleting the file using the Terminal.

To delete the file, type “rm -f ” followed by a single space, then drag the file to the Terminal window and press Enter. If the Terminal states the file cannot be deleted because you do not have permissions, then run the command “sudo !!” (the word “sudo” followed by a space and then two exclamation points) to re-run the prior command while prefixing it with “sudo” so it will run as administrator. Enter your password when prompted (it will not show when typed), and the command should now successfully run.

To move the file instead of deleting, perform the following steps in the Terminal:

  1. Type “mv ” followed by a single space.
  2. Drag the problematic file from the Finder to the Terminal window (its path should be entered).
  3. Similarly drag the destination folder to the Terminal window.
  4. Press Enter to execute the command.

As with removing the file, if this gives you a permissions-related error, then enter “sudo !!” and authenticate to repeat the command as administrator. You might also use “cp” instead of “mv” to invoke a copy action (as opposed to moving it). This will still have the problematic one stuck in its location, but you should be able to preserve the copy in case you cannot recover the first.

Author

Mac Issues

At Mac Issues, we're dedicated to helping you learn how to use your Macbook properly. With tutorials, how-to troubleshooting guides & real reviews, hopefully we can make your day that little bit easier.

Read more from Mac Issues