PDA

View Full Version : How to unlock multiple files easily?




SPG
Oct 10, 2007, 02:41 PM
I have a ton of footage that was loaded into my computer over the summer. The jobs done and I could really use those couple hundred gigs of space. Only catch is that all the files are locked! I know how to unlock them manually, Apple-I , uncheck the locked icon and then to the trash, but there are THOUSANDS of files in hundreds of folders...a real PITA!
I'm not super familiar with automator, but didn't see a solution there either.
Anyone got a good trick to do this quickly? Otherwise it's gonna take me hours to do it manually.



plinden
Oct 10, 2007, 02:44 PM
I have a ton of footage that was loaded into my computer over the summer. The jobs done and I could really use those couple hundred gigs of space. Only catch is that all the files are locked! I know how to unlock them manually, Apple-I , uncheck the locked icon and then to the trash, but there are THOUSANDS of files in hundreds of folders...a real PITA!
I'm not super familiar with automator, but didn't see a solution there either.
Anyone got a good trick to do this quickly? Otherwise it's gonna take me hours to do it manually.

Do you want to just delete all the files? Are they all under one top level directory?

You can probably delete them from an admin account using the Terminal command "sudo rm -rf <...directory name ...>". Be very careful with that, though. Double check you're in the right place.

If you want to just unlock them, you can use the Terminal command chflags (I haven't tried this exactly, but this seems the correct syntax from the man page):
chflags -R nouchg <... directory name ...>

Edit: yes, I've tried that and it should work

eb6
Oct 10, 2007, 02:44 PM
did you try selecting all the files at once and hitting command+I? I think if you select enough files it will just bring up just one info box instead of one for each file. Its worth a shot.

SPG
Oct 10, 2007, 03:07 PM
did you try selecting all the files at once and hitting command+I? I think if you select enough files it will just bring up just one info box instead of one for each file. Its worth a shot.

Thanks for the suggestion but the problem with that approach is that there are usually only about 5 or six files in each folder...not enough to trigger one info pane, but enough to be a pain.
Copying them all into a single folder results in duplicates being made which isn't helpful...oh well.

SPG
Oct 10, 2007, 03:12 PM
You can probably delete them from an admin account using the Terminal command "sudo rm -rf <...directory name ...>". Be very careful with that, though. Double check you're in the right place.

If you want to just unlock them, you can use the Terminal command chflags (I haven't tried this exactly, but this seems the correct syntax from the man page):
chflags -R nouchg <... directory name ...>

Edit: yes, I've tried that and it should work

Option one seems pretty scary since I'm not that confident with my programming skills and I have a bunch of current projects on that same drive, so I'll try option two. Thanks!

angelwatt
Oct 10, 2007, 05:16 PM
Thanks for the suggestion but the problem with that approach is that there are usually only about 5 or six files in each folder...not enough to trigger one info pane, but enough to be a pain.
Copying them all into a single folder results in duplicates being made which isn't helpful...oh well.

With a bunch of files selected, right-click on them and when the menu pops-up hold the Option key and you'll see one of the options change to Show Inspector. This'll force just one window popping open and allow you to change the lock setting.

SPG
Oct 11, 2007, 12:07 PM
With a bunch of files selected, right-click on them and when the menu pops-up hold the Option key and you'll see one of the options change to Show Inspector. This'll force just one window popping open and allow you to change the lock setting.

Nicely done.


thank you.

arkitect
Oct 11, 2007, 12:24 PM
With a bunch of files selected, right-click on them and when the menu pops-up hold the Option key and you'll see one of the options change to Show Inspector. This'll force just one window popping open and allow you to change the lock setting.

Chossing the files and then doing Option-Command-I also works. No need to right click.

angelwatt
Oct 11, 2007, 04:18 PM
Chossing the files and then doing Option-Command-I also works. No need to right click.

Good to know.

MivecGPX
Aug 27, 2011, 02:47 PM
chflags -R nouchg.... bang on. None of this cmd-I nonsense, fixed in one go. Thanks for saving me soooo much time digging into each folder and unticking the "locked" flag. :)