Copy link to clipboard
Copied
Hi all,
quick question: is there a smart way in Bridge to only find locked items? Advanced search or filters don't seem to offer such a search.
THX!
Martin
This is not a correct answer and not helpful. OP, please ignore this.
You can use a script to identify locked files.
This is a bare-bones snippet of the logic used:
var sels = app.document.selections;
for(var i = 0; i < sels.length; i++){
if(sels[i].locked == true){
//do some action
}
}
This would need to be made into an actual functioning script, with whatever action (assigning a keyword or label, for example) that you wanted.
Copy link to clipboard
Copied
In a word, no.
Be careful folks of what has been asked.
Is it wise to cultivate that sort of behavior?
Copy link to clipboard
Copied
Thanks for quick and clear reply. Will then assign a keyword simultaneously fo identify the locked files.
Martin
Copy link to clipboard
Copied
This is not a correct answer and not helpful. OP, please ignore this.
You can use a script to identify locked files.
This is a bare-bones snippet of the logic used:
var sels = app.document.selections;
for(var i = 0; i < sels.length; i++){
if(sels[i].locked == true){
//do some action
}
}
This would need to be made into an actual functioning script, with whatever action (assigning a keyword or label, for example) that you wanted.
Copy link to clipboard
Copied
Thanks for this update, Lumigraphics.
Sorry to come back, being a complete scripting newbie. Could you please replace //do some action with a working example, so that a dummy keyword is assigned. And if I got it right I have to copy the code (anything else to add?) into a text editor and save as .jsx file and then implement via Bridge Preferences.
Thanks once again for your time. M
Copy link to clipboard
Copied
This is nowhere near a complete script. I just wanted to show the basic logic. I'm sorry but I don't have time at the moment, but there are loads of examples posted on here that you could adapt.
Copy link to clipboard
Copied
@Lumigraphics, quick question. Do you know why the state of "Locked" is not in the Filter options?
When I first saw this question, I tested for that and was surprised that there was nothing for it. If something is possible, it should be added to the list of features. Thoughts?
Copy link to clipboard
Copied
Yes seems like it should be. We should be able to add many more filter/sort options like Locked and Title.
Copy link to clipboard
Copied
Here is a functional script example, however, it uses LOCKED=FALSE as it doesn't appear to be possible to change a locked file. A custom white label is added, but this could be a standard label, or star rating, keyword etc:
#target bridge
unlockedFiles = {};
unlockedFiles.execute = function () {
var sels = app.document.selections;
for (var i = 0; i < sels.length; i++) {
var md = sels[i].synchronousMetadata;
md.namespace = "http://ns.adobe.com/photoshop/1.0/";
md.namespace = "http://ns.adobe.com/xap/1.0/";
if (sels[i].locked == false) {
md.Label = "Custom";
}
}
}
if (BridgeTalk.appName == "bridge") {
var menu = MenuElement.create("command", "Add Custom Label to Unlocked Files", "at the end of Tools");
menu.onSelect = unlockedFiles.execute;
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
In my tests on the Mac OS, files that are locked at the system level don't accept changes in Bridge.
So simply select all files that need to be identified and add an unused rating, label or keyword etc that you can easily search/sort/filter by. The locked files will not receive this change, so this works opposite to the original request while still allowing the files to be found by the excluded value, rather than the included value.
Copy link to clipboard
Copied
@all. Thx all for your thoughts! In a nutshell, we are talking about tagging "all" files with an explicit flag (keyword, whatever). Then a negative search for this flag will reveal the locked files because these haven't been tagged - because they are locked. Very good.
Thanks for your help!! M
Find more inspiration, events, and resources on the new Adobe Community
Explore Now