Can't delete a file from the desktop

theNEOone

macrumors 6502
Original poster
Jun 28, 2007
250
0
NYC
There's a file on my desktop that was being copied from an external SD card but was interrupted. Now I cannot delete the freaking thing....what's going on? I've tried rebooting and then deleting, but that didn't work.

I get an error message that says "Some of the items you are moving are in use by another application. Moving the items can cause problems with the application using them. Are you sure you want to move these items?"

Clicking "Continue" doesn't actually delete the file....dragging and dropping the file into the trash also does nothing.

Help?


=|
 

blodwyn

macrumors 65816
Jul 28, 2004
1,147
1
Portland, Oregon
Open a Terminal window. Type "rm " (i.e. rm followed by a space and without the quotes), then drag the file from the desktop onto the terminal window. Press return in the terminal window and the file should disappear. If it doesn't then try "rm -f " instead. If the file is a package or a folder then use "rm -rf " instead.
 

lostngone

macrumors 65816
Aug 11, 2003
1,372
3,126
Anchorage
Open a Terminal window. Type "rm " (i.e. rm followed by a space and without the quotes), then drag the file from the desktop onto the terminal window. Press return in the terminal window and the file should disappear. If it doesn't then try "rm -f " instead. If the file is a package or a folder then use "rm -rf " instead.
Please be very careful with the rm -rf command. You can end up having a very bad day with that command.

-f is force
-r is recursive, that means you have the possibility of easing everything in that directory
 

blodwyn

macrumors 65816
Jul 28, 2004
1,147
1
Portland, Oregon
Please be very careful with the rm -rf command. You can end up having a very bad day with that command.

-f is force
-r is recursive, that means you have the possibility of easing everything in that directory
I totally agree, that's why I always advocate dragging the file/folder you want to delete on to the Terminal window. That way you should avoid any typos in the pathname to the file.
 

Marx55

macrumors 68000
Jan 1, 2005
1,715
542
Great. Worked for me to delete a partial (corrupt) file generated after trying to copy it. Then I could not move or delete it. I could not delete it, even after rebooting in Safe Mode (pressing Shift key when booting). This worked as described above:

Open Terminal - Type rm - Drag & Drop file there - Press carriage return - Enter password if required

That is! Corrupt file has now been deleted.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.