Macworld Forums

Macworld Forums: Locked files - Macworld Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Locked files

#1 User is offline   jam2000 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 4
  • Joined: 02-June 12

Posted 05 June 2012 - 09:06 AM

I have a number of files (mostly jpgs) that are 'locked' - under 'Get Info', the Locked box is selected. This prevents me from deleting these files when using Lightroom - I get the message that it cannot be moved to the Trash. If I deselected 'Locked' (right click, go to 'get info', deselect 'Locked'), everything thing works fine, file is removed from Lightroom and the hard drive (which is what I am trying to achieve). However, I can't go through the 30,000 files plus and manually 'unlock' all of them.

Can anyone help on how to unlock all files within a specific folder (and subfolders)?

Thanks
0

#2 User is offline   bastion 

  • Power User
  • PipPipPipPip
  • Group: Members
  • Posts: 9,114
  • Joined: 14-October 04

Posted 05 June 2012 - 10:37 AM

View Postjam2000, on 05 June 2012 - 09:06 AM, said:

I have a number of files (mostly jpgs) that are 'locked' - under 'Get Info', the Locked box is selected. This prevents me from deleting these files when using Lightroom - I get the message that it cannot be moved to the Trash. If I deselected 'Locked' (right click, go to 'get info', deselect 'Locked'), everything thing works fine, file is removed from Lightroom and the hard drive (which is what I am trying to achieve). However, I can't go through the 30,000 files plus and manually 'unlock' all of them.

Can anyone help on how to unlock all files within a specific folder (and subfolders)?


So many choices. The most direct one is this:

chflags -R nouchg /path/to/root/jpeg/folder/

Word by word, this is:

change flags on the specified item(s)
recursively
turn off the "unchangeable" flag
[and then the list of items to operate on]

This post has been edited by bastion: 05 June 2012 - 10:39 AM

0

#3 User is offline   jam2000 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 4
  • Joined: 02-June 12

Posted 05 June 2012 - 12:23 PM

Thanks - given I am not all that technically sophisticated - I enter that command in Terminal?

This post has been edited by jam2000: 05 June 2012 - 12:23 PM

0

#4 User is offline   bastion 

  • Power User
  • PipPipPipPip
  • Group: Members
  • Posts: 9,114
  • Joined: 14-October 04

Posted 05 June 2012 - 12:42 PM

View Postjam2000, on 05 June 2012 - 12:23 PM, said:

Thanks - given I am not all that technically sophisticated - I enter that command in Terminal?


Yep. Sorry for not being clearer.
0

#5 User is offline   Martian 

  • Veteran
  • PipPipPip
  • Group: Members
  • Posts: 2,388
  • Joined: 27-September 01

Posted 05 June 2012 - 02:06 PM

The simpler way to go (and the way non unix speeking troglodytes like me feel more comfortable with), just Select All, then COMMAND OPTION I. Pressing OPTION changes Get Info (under File menu) to Show Inspector. This opens up one single window with the Locked File box for the entire multiple file selection.

BTW if you Select All, then just Get Info, you can close all 12 million windows with COMMAND OPTION W...then start again.
0

#6 User is offline   jam2000 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 4
  • Joined: 02-June 12

Posted 05 June 2012 - 02:53 PM

Nice. Command option I did it perfectly. Thanks Bastion too - part of me was looking forward to my first use of Terminal!
0

#7 User is offline   bastion 

  • Power User
  • PipPipPipPip
  • Group: Members
  • Posts: 9,114
  • Joined: 14-October 04

Posted 05 June 2012 - 02:59 PM

View PostMartian, on 05 June 2012 - 02:06 PM, said:

The simpler way to go (and the way non unix speeking troglodytes like me feel more comfortable with), just Select All, then COMMAND OPTION I. Pressing OPTION changes Get Info (under File menu) to Show Inspector. This opens up one single window with the Locked File box for the entire multiple file selection.

BTW if you Select All, then just Get Info, you can close all 12 million windows with COMMAND OPTION W...then start again.


And that works on a complete folder hierarchy? Cool. I've learn something new today.

...

No, in fact it doesn't. So I suppose if you have all 30,000 images in a single folder this technique would work in that the images themselves would be part of the selection, and that I knew. But it never occurred to me that the OP would have that many files all in a single view. The terminal command I offered would traverse an entire directory tree. Different tools for different needs.

This post has been edited by bastion: 05 June 2012 - 03:07 PM

0

#8 User is offline   jam2000 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 4
  • Joined: 02-June 12

Posted 05 June 2012 - 03:16 PM

Agreed, doesn't work on the complete hierarchy, but given my fear of Terminal, probably the best way for me to go - not that many sub folders. - Agreed, different tools for different needs (and comfort levels!).
0

#9 User is offline   Martian 

  • Veteran
  • PipPipPip
  • Group: Members
  • Posts: 2,388
  • Joined: 27-September 01

Posted 05 June 2012 - 03:30 PM

View Postjam2000, on 05 June 2012 - 03:16 PM, said:

Agreed, doesn't work on the complete hierarchy, but given my fear of Terminal, probably the best way for me to go - not that many sub folders. - Agreed, different tools for different needs (and comfort levels!).
I hadn't thought of that hierarchical problem.

But on cursory examination, it seems that after Selecting All in the top folder, you can then COMMAND OPTION Right Arrow which should open all the subfolder layers at once. Then again do a Select All to select every file (and folder, but that's harmless) followed by the Show Inspector. I just tried it on my Air running Lion on two layers of subfolders with a total of about 1000 jpegs and it worked.

I first locked, spot tested, then unlocked the 1000 files. I don't see why 30 times as many jpegs and a deeper hierarchy should be qualitatively different.

This post has been edited by Martian: 05 June 2012 - 03:38 PM

0

#10 User is offline   bastion 

  • Power User
  • PipPipPipPip
  • Group: Members
  • Posts: 9,114
  • Joined: 14-October 04

Posted 05 June 2012 - 03:42 PM

View PostMartian, on 05 June 2012 - 03:30 PM, said:

View Postjam2000, on 05 June 2012 - 03:16 PM, said:

Agreed, doesn't work on the complete hierarchy, but given my fear of Terminal, probably the best way for me to go - not that many sub folders. - Agreed, different tools for different needs (and comfort levels!).
I hadn't thought of that hierarchical problem.

But on cursory examination, it seems that after Selecting All in the top folder, you can then COMMAND OPTION Right Arrow which should open all the subfolder layers at once. Then again do a Select All to select every file (and folder, but that's harmless) followed by the Show Inspector. I just tried it on my Air running Lion on two layers of subfolders with a total of about 1000 jpegs and it worked.

I first locked, spot tested, then unlocked the 1000 files. I don't see why 30 times as many jpegs and a deeper hierarchy should be qualitatively different.


Only that UI responsiveness goes into the toilet after several thousand files in a single view.
0

#11 User is offline   Martian 

  • Veteran
  • PipPipPip
  • Group: Members
  • Posts: 2,388
  • Joined: 27-September 01

Posted 05 June 2012 - 03:56 PM

View Postbastion, on 05 June 2012 - 03:42 PM, said:

Only that UI responsiveness goes into the toilet after several thousand files in a single view.


Oh. I guess also that this would be a more serious problem on a conventional HD (which I assume the OP was using) -- I did my experiment on an Air with its internal SSD
0

#12 User is offline   bastion 

  • Power User
  • PipPipPipPip
  • Group: Members
  • Posts: 9,114
  • Joined: 14-October 04

Posted 05 June 2012 - 05:30 PM

View PostMartian, on 05 June 2012 - 03:56 PM, said:

View Postbastion, on 05 June 2012 - 03:42 PM, said:

Only that UI responsiveness goes into the toilet after several thousand files in a single view.


Oh. I guess also that this would be a more serious problem on a conventional HD (which I assume the OP was using) -- I did my experiment on an Air with its internal SSD


SSD helps a lot, but it still goes downhill pretty rapidly. For example I just created 1000 empty files in a new folder, then opened the folder. That took several seconds, just to open. I tried again with 30000 files. Took 6 seconds just for the first batch of 4000 to be recognized and minutes to reflect the whole set. That is, to be clear, with an SSD.
.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users