PAULPAYNE - Apr 15, 2006 - 11:45 am
I would appriciate help from anyone who might have any ideas about this problem I am having, its driving me crazy !
I have one file in my Trash, its called 'Windows Media Player' and its 2.1MB in size. The problem is, whenever I try to 'Empty Trash' I get an error message saying 'The operation cannot be completed because the file wmphelp.htm is locked'.
I dont know what or where 'wmphelp.htm' is (its certainly not in the trash folder) and I dont know what its got to do with the file that I am actually trying to delete. (Windows Media Player).
I am using a G4 Powerbook running 10.4.6
bobw - Apr 15, 2006 - 11:55 am
Hi Paul
Take the file out of the trash to the Desktop.
Open the Terminal Application (in Utilities folder) and type:
cd ~/.Trash
hit return
sudo rm -rf
put a space after the f and drag the item you want deleted to the terminal so that its path is automatically entered, then press return
give it your admin password and hit return
bobw
http://www.macosx.com
PAULPAYNE - Apr 15, 2006 - 12:02 pm
Oh My God - Thats amazing. It worked perfectly, thankyou so much. Part of me wants to understand why and what that command did, but the other part is just happy that its fixed ! I only switched to MAC's about a year ago and am still learning but am so glad I am using apple now.
Thankyou very much for your time and for answering my query so quickly !
Regards, Paul P
bobw - Apr 15, 2006 - 12:06 pm
Paul
Glad I could help.
That wmphelp.htm file is locked and inside the WMP package.
Keep that command for the Trashing in Terminal handy incase it happens again.
bobw
http://www.macosx.com
PAULPAYNE - Apr 15, 2006 - 12:09 pm
Thankyou
PAULPAYNE - Jan 29, 2008 - 9:17 pm
Hi Bob - could I ask for your help again?
I have the same problem which you kindly solved for me previously however this time I am trying to delete a directory rather than a single file and terminal is giving me the error "Directory not empty".
Is there a variation of your above command I could use in terminal to trash the entire directory?
Thanks in advance.
tubajensen - Jan 30, 2008 - 4:49 am
You could use:
sudo rm -fdr
If you want to know more about the rm command just type:
man rm
in Terminal application and hit the return key on your keyboard. To scroll forward page wise in the text press the space key and to stop reading about the command press q. You can also use the up and down arrow keeys to scrol back and forth. This works for all man pages.
Allan
PAULPAYNE - Jan 31, 2008 - 1:51 pm
Allan,
Thank you for responding to me. I get the following error when using that command:
...Directory not empty
(output below)
I know the Directory is not empty - I am trying to delete everything within it.
Do you have any other suggestions I might be able to try?
Thanks,
Paul P
Last login: Fri Feb 1 06:46:55 on console
paul-paynes-macbook:~ Paul$ sudo rm -fdr /Volumes/LACIE/Backups/Paul\ Payne’s\ MacBook/2007-11-13-143819
Password:
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/Library: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/private/var/samba: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/private/var: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/private: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/Users/Paul/Library/Preferences: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/Users/Paul/Library: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/Users/Paul: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD/Users: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819/Macintosh HD: Directory not empty
rm: /Volumes/LACIE/Backups/Paul Payne’s MacBook/2007-11-13-143819: Directory not empty
paul-paynes-macbook:~ Paul$
tubajensen - Feb 1, 2008 - 5:36 am
To check my suggestion again I tried using the command on a folder full of different folders containing documents. It works - even without the sudo command at the beginning. I then tried using the command on my TimeMachine backups. Here I get:
rm: some_filename: Operation not permitted
I then checked the permissions on my backup folder and found that it is owned by root. I don't know if this has something to do with not being able to use:
sudo rm -fdr
to delete backup folders and their contents. Strangely enough if I drag one of my backup folders (containing lots of different folders an files) to the Trash I just get asked for my administrator password to do this. Emptying the Trash afterwards is no problem, except for the empty folders still being present. However, if I empty the Trash once again also these will disappear. Maybe this would be a way to go for you. Let me know!
Allan
PAULPAYNE - Feb 1, 2008 - 2:21 pm
Allan,
Tried that same command on other directories, it does indeed work for me too.
The directories that I can not delete are Backup directories also.
When I drag the folder to the trash, I get a message saying "Preparing to delete immediately' - it then counts up to 2000 files and gives me the same error I had from the start. "The operation can not be completed because the file XXX is in use."
If there is a way to attach screen shots to this ticket maybe I could show you.
Under "Get Info" it says "You have custom permissions" for the folder (I dont know much about permissions).
Is there anything else I can try?
tubajensen - Feb 2, 2008 - 8:48 am
Sorry, I can't suggest anything else. The warning about the file being in use could be due to a backup going on. What happens if you stop the backup? Please tell me if you want the question re-opened for another tech to view.
Allan
PAULPAYNE - Feb 2, 2008 - 2:55 pm
Thank you - these are old backup files (i.e. no backup running). I would appreciate if you could reopen - I am very appreciative of your time and advice to me, thank you.
TechSupport - Feb 5, 2008 - 3:00 pm
We apologize for not being able to resolve the issue you asked of us. It is the absolute worst case scenario for us to do this. In our review of why this happens, it generally is related to either the particular issue being addressed or frequently, incomplete or incorrect information provided. We hope by moving your request to the public forums that you will be able to get a solution without leaving you empty handed.
Your ticket has been closed with our support team. Your request has just been posted to
Mac OS X System & Mac Software and is available for your viewing at:
http://macosx.com/forums/showthread.php?t=298239
Again, thank you for using Macosx.com. We hope you will consider using us again in the future.