Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to find locked files only?

Explorer ,
Mar 02, 2024 Mar 02, 2024

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  

TOPICS
Keywords , Metadata
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 04, 2024 Mar 04, 2024

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.

Translate
Explorer ,
Mar 02, 2024 Mar 02, 2024

In a word, no. 

 

Be careful folks of what has been asked.

 

Is it wise to cultivate that sort of behavior?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 02, 2024 Mar 02, 2024

Thanks for quick and clear reply. Will then assign a keyword simultaneously fo identify the locked files.

Martin

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2024 Mar 04, 2024

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 04, 2024 Mar 04, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2024 Mar 04, 2024

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2024 Mar 04, 2024

@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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2024 Mar 05, 2024

Yes seems like it should be. We should be able to add many more filter/sort options like Locked and Title.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2024 Mar 04, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2024 Mar 04, 2024

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 ratinglabel 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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 05, 2024 Mar 05, 2024
LATEST

@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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines