Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BGTHEMOGUL

macrumors regular
Original poster
Nov 12, 2010
249
1
Took a screen shot of my computer and emailed it to someone. Then I took it from the desktop and put it in the trash. Now when I go to empty the trash it tells me "The operation can’t be completed because the item “Screen shot 2010-11-15 at 6.58.08 PM” is in use."

I can't seem to figure out where the file is in use. Any thoughts?
 

Xenc

macrumors 65816
May 8, 2010
1,043
290
London, England
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2 like Mac OS X; en-gb) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C134 Safari/6533.18.5)

In Terminal:

rm -rf ~/.Trash/*
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943
Thanks. Logging out and back in worked. Any thought what may have caused this so I can try and avoid it from happening in the future?
You probably could have restarted Finder or Preview or some other app that still had access to the file. Logging out and back in eliminates the guesswork as to which app was the culprit.
 

BGTHEMOGUL

macrumors regular
Original poster
Nov 12, 2010
249
1
Apparantly it has something to do with when I email an attachment. I just sent another email with a text document attached and now when I try to delete that document from the desktop it gives me the same error message.

This is the first 2 times I've tried emailing attachments since I got this Macbook Pro and it's happened both times.

Anybody know how to fix this?
 

BGTHEMOGUL

macrumors regular
Original poster
Nov 12, 2010
249
1
Update

If I quit the Mac Mail program it will let me empty the trash. Does anybody know how to stop this from happening so I don't have to close the mail program everytime I want to empty the trash that has files in it I've emailed to somebody?
 

bmcgonag

macrumors 65816
Mar 20, 2007
1,077
0
Texas
Update

If I quit the Mac Mail program it will let me empty the trash. Does anybody know how to stop this from happening so I don't have to close the mail program everytime I want to empty the trash that has files in it I've emailed to somebody?

When you email an attachment it get's put into a temporary location, kind of like the temp folder in Windodws. So, when you delete the original file, you still have a "copy" of it somewhere else, or an active pointer to the original file. THe mail client is still using it so it can't be deleted.

It could be somewhat about how you are attaching the file. Does the file open int he email body after you attach it? If so, then it may be considered as open. So if you open a file in Preview, then delete the file without closing it out in preview, you can't empty the trash yet, because the file is still in use.

If this is the case, then maybe there is a way to attach it without it opening in the email body.
 

BGTHEMOGUL

macrumors regular
Original poster
Nov 12, 2010
249
1
I checked to make sure Preview was not open or running. I also made sure TextEdit was not open or running with the document. It must be something the mail program is doing that makes it think the attachment is actually open.

This is annoying and an obvious issue with the communication between Mac Mail and the OS so hopefully they resolve this.

If anybody knows a solution please chime in. Thanks!
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943
This is annoying and an obvious issue with the communication between Mac Mail and the OS so hopefully they resolve this.
Why do you feel that you need to empty the trash after every email? It could be Finder or some other process holding onto the file, but you don't have to empty the trash so often. Every day or so, you can log out and back in. If you insist on tracking it down, launch Activity Monitor and start killing processes (be careful!) and trying to empty the Trash, until you find the culprit.
 

gertudby

macrumors newbie
Nov 17, 2010
2
0
Quitting Mac Mail did the trix for me :)
I got 3 screenshots that were emailed, and I couldn't delete them from trash.
(restarting finder or preview didn't help)

Cheers
Gert

I checked to make sure Preview was not open or running. I also made sure TextEdit was not open or running with the document. It must be something the mail program is doing that makes it think the attachment is actually open.

This is annoying and an obvious issue with the communication between Mac Mail and the OS so hopefully they resolve this.

If anybody knows a solution please chime in. Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.