Deleting locked .htm file

Joined
Jan 24, 2007
Messages
345
Reaction score
4
Points
18
Location
Hamilton, New Zealand
Your Mac's Specs
MacBook black, Intel C2D 2GHz, 2GB RAM, 320GB WD Scorpio HD
I was trying to empty my Trash but it won't delete the file with htm extension. The message says:

"The operation cannot be completed because the file 'filename.htm' is locked"

Does anyone has any suggestion on how to delete these files? Thanks.
 
OP
hagios1972
Joined
Jan 24, 2007
Messages
345
Reaction score
4
Points
18
Location
Hamilton, New Zealand
Your Mac's Specs
MacBook black, Intel C2D 2GHz, 2GB RAM, 320GB WD Scorpio HD
By the way, I used AppDelete to unistall Windows Media Player and the deleted files in the Trash are in the folder "AppDelete Windows Media Player". It seems that this the the folder with locked htm files.
 
OP
hagios1972
Joined
Jan 24, 2007
Messages
345
Reaction score
4
Points
18
Location
Hamilton, New Zealand
Your Mac's Specs
MacBook black, Intel C2D 2GHz, 2GB RAM, 320GB WD Scorpio HD
Solved it. Found and used this:
Recently I found myself wanting to get rid of Windows Media Player 9. I used AppZapper to get all the application components in the trash, but then I was unable to delete it because files (specifically .htm files) deep within the contents of the app are locked. So after a little research, I came across this fairly simple solution and figured I'd share it:

Warning: Typographical error or misuse of the following rm -rf command can result in serious data loss. Insertion of a space in the wrong place could result in the complete deletion of data on your hard disk, for example. You may wish to copy and paste the commands below into a text editor to verify spacing. Follow these steps to delete Trash for the logged-in user:
1. Use a program like AppZapper to get all WMP components in the trash.
2. Open the Terminal application, in /Applications -> Utilities.
3. In Terminal, type sudo rm -rf[space]. Don't type [space] literally; just press the space bar on the keyboard. Do not press Return.
4. In Finder, open your Trash.
5. Choose Select All from the Edit menu.
6. Drag the selection (all) from the Trash window into the Terminal window. This causes the Terminal window to automatically fill in the name and location of each item in your Trash.
7. Press Return.
Now your computer will be free from Windows Media Player.

Found this as well from http://docs.info.apple.com/article.html?artnum=106272
Deleting locked files
Locked files can easily be deleted if you press Shift-Option or Option key combination while emptying the Trash (in Mac OS X 10.1 and later). For Mac OS X versions 10.0 to 10.0.4, use Show Info to deselect the item's Locked checkbox.
 
M

MacHeadCase

Guest
Glad you sorted it out, hagios! (Nice avatar btw)

Was wondering... Did you try Secure Empty Trash? That solves a lot of recalcitrant files that don't want to delete with the normal Empty Trash command.

You could have tried the workarounds that are posted in this thread or again another nifty trick posted here.

Of course, this being a M$ app, are we very much surprised we can't get rid easily of something written by them and that was installed on our systems? That's why I avoid their software like the plague they are. The only behemoth I'm willing to tangle with is Adobe. LOL

Anyway, good thing you resolved this issue! Congrats! :)
 
OP
hagios1972
Joined
Jan 24, 2007
Messages
345
Reaction score
4
Points
18
Location
Hamilton, New Zealand
Your Mac's Specs
MacBook black, Intel C2D 2GHz, 2GB RAM, 320GB WD Scorpio HD
Glad you sorted it out, hagios! (Nice avatar btw)

Was wondering... Did you try Secure Empty Trash? That solves a lot of recalcitrant files that don't want to delete with the normal Empty Trash command.

You could have tried the workarounds that are posted in this thread or again another nifty trick posted here.

Of course, this being a M$ app, are we very much surprised we can't get rid easily of something written by them and that was installed on our systems? That's why I avoid their software like the plague they are. The only behemoth I'm willing to tangle with is Adobe. LOL

Anyway, good thing you resolved this issue! Congrats! :)

Thanks for providing the links to the other threads. I will now avoid those M$ softwares. I have learned my lesson. RE the avatar, my wife and I have a knock for German Shepherd dogs. We used to have them but the picture will suffice for now. :)
 
OP
hagios1972
Joined
Jan 24, 2007
Messages
345
Reaction score
4
Points
18
Location
Hamilton, New Zealand
Your Mac's Specs
MacBook black, Intel C2D 2GHz, 2GB RAM, 320GB WD Scorpio HD
Oh, BTW, I also tried the Secure Empty Trash but it did not work either.
 
Joined
Jan 14, 2007
Messages
101
Reaction score
5
Points
18
Your Mac's Specs
1.67ghz powerbook G4, 1GB RAM, 100GB HD.
If you 'get info' on the object that is locked there is a tickbox saying locked. Untick the box and it becomes a normal, editable and deletable file again :)

I think its to stop you accidently deleting / editing important files.
 
Joined
Apr 20, 2007
Messages
198
Reaction score
2
Points
18
Location
little bit north of dallas
Your Mac's Specs
MBP C2D, 1 GB ram, 120GB HD
i had that exact same problem. i called applecare and they told me to hold down option key while clicking empty trash.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top