image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old September 2nd, 2005, 04:12 PM
Registered User
 
Join Date: Aug 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
iKwak is on a distinguished road
Arrow Deleting a protected file

I have a folder that contains .rtf files.
When I put the folder to trash and try deleting it,

"The operation cannot be completed because the item "File Name" is locked."



How can you empty the trash? Thank you in advance.
OS: Panther 10.3.9
Reply With Quote
  #2  
Old September 2nd, 2005, 04:28 PM
Registered User
 
Join Date: May 2005
Posts: 1,339
Thanks: 0
Thanked 1 Time in 1 Post
barhar is on a distinguished road
01. Launch 'Terminal' ('/Applications/Utilities/'), and enter 'rm -rf ' (yes, add a space after 'f' in '-rf'; but, excluded the single quote marks).
02. Drag the folder containing the '.rtf' files onto the 'Terminal' window.
03. Click on the 'Terminal' window, and press the <return> key.

Warning:
'rm -rf ...' is dangerous and quite destructive. Use it cautiously.
Reply With Quote
  #3  
Old September 2nd, 2005, 06:16 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,507
Thanks: 4
Thanked 15 Times in 14 Posts
Mikuro is on a distinguished road
You can also do it in the Finder by holding down the Option key while selecting "Empty Trash" from the Finder menu. This will immediately empty the trash (without the usual warning), even if it contains locked files.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.5

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
  #4  
Old September 2nd, 2005, 09:12 PM
Registered User
 
Join Date: May 2005
Posts: 1,339
Thanks: 0
Thanked 1 Time in 1 Post
barhar is on a distinguished road
MacOS X 10.4.0 trials:

A file was duplicated (titled 'guru copy.hqx'), and via it's 'Get Info' window - was locked.
Whether the <option> key was pressed or not, as the file was dragged onto the 'Dock' based 'Trash can' icon, this message appeared - 'The operation cannot be completed because the item "guru copy.hqx" is locked'. Unlocking the file allowed it to be placed into the trash can and deleted.

A file was duplicated (titled 'guru copy.hqx'), and via it's 'Get Info' window - was locked, and placed into a folder (titled 'Guru') - that was not locked.
When the folder was dragged onto the 'Dock's 'Trash can' icon, it was accepted, and could be deleted via 'Finder's 'Finder, Empty Trash' menu item. (Go figure, Apple!)

A file was duplicated (titled 'guru copy.hqx'), and via it's 'Get Info' window - was locked, and placed into a folder (titled 'Guru') - that was then locked.
When the folder was dragged onto the 'Dock's 'Trash can' icon, this message appeared - 'The operation cannot be completed because the item "Guru" is locked'. Unlocking the folder allowed it, and its contents, to be placed into the trash can and deleted.

A file was duplicated (titled 'guru copy.hqx') and left unlocked, and placed into a folder (titled 'Guru') - that was then locked.
When the folder was dragged onto the 'Docks 'Trash can' icon, this message appeared - 'The operation cannot be completed because the item "Guru" is locked'. Unlocking the folder allowed it, and its contents, to be placed into the trash can and deleted.

-----
MacOS X 10.3.9 trials:

A file was duplicated (titled 'guru copy.hqx'), and via it's 'Get Info' window - was locked.
Whether the <option> key was pressed or not, as the file was dragged onto the 'Dock' based 'Trash can' icon, this message appeared - 'The operation cannot be completed because the item "guru copy.hqx" is locked'. Unlocking the file allowed it to be placed into the trash can and deleted.

A file was duplicated (titled 'guru copy.hqx'), and via it's 'Get Info' window - was locked, and placed into a folder (titled 'Guru') - that was not locked.
When the folder was dragged onto the 'Dock's 'Trash can' icon, it was accepted, and could be deleted via 'Finder's 'Finder, Empty Trash' menu item. (Go figure, Apple!)

A file was duplicated (titled 'guru copy.hqx'), and via it's 'Get Info' window - was locked, and placed into a folder (titled 'Guru') - that was then attempted to be locked, it cannot not. The 'locked' check box is dimmed.
To lock the folder, I had to use 'Terminal' - enter 'chflags -R uchg ' drag the 'Guru' folder onto the 'Terminal' window, and press the <return> key. Only then was the folder locked.
When the (now locked) folder was dragged onto the 'Dock's 'Trash can' icon, this message appeared - 'The operation cannot be completed because the item "Guru" is locked'. Unlocking the folder allowed it, and its contents, to be placed into the trash can and deleted.

A file was duplicated (titled 'guru copy.hqx') and left unlocked, and placed into a folder (titled 'Guru') - that was then locked. See above paragraph of how to lock a folder in 'Panther'.
When the folder was dragged onto the 'Docks 'Trash can' icon, this message appeared - 'The operation cannot be completed because the item "Guru" is locked'. Unlocking the folder allowed it, and its contents, to be placed into the trash can and deleted.

----- ----- ----- -----
So, it appears that iKwak's folder, of '.rtf' files (whether the '.rtf' files were locked or not) was locked. Launching 'Terminal' - entering 'chflags -R nouchg ', dragging the locked folder onto the 'Terminal' window, and pressing the <return> key - would have allowed iKwak to unlock the folder and then trash the folder (along with its contents). Using 'Terminal' with 'rm -rf ...' just shortened the process.

Whether running MacOS X 10.3.9, 10.4.0, or 10.4.2 - when a file (or files) and / or folder(s) are locked, regardless of the View type ('Icon', 'List', or 'Column'), a small pad lock symbol will appear at the lower left portion of file's or folder's icon. This should assist those trying to determine which file(s) and / or folder(s) needs to be unlocked, so such item(s) can be deleted.

Reference:
MattJ's 'Terminal's 'chflags -R nouchg ' entries at this NiMUG web page.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 08:51 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.