Library module Folder name to keywords -a plugin for this?

Status
Not open for further replies.

process

Active Member
Joined
Jun 10, 2013
Messages
231
Lightroom Experience
Intermediate
Lightroom Version
6.x
Lightroom Version Number
6.14
Operating System
  1. macOS 10.13 High Sierra
Is there a plugin (or a way to do it within LR itself) which takes the name of the folder and adds it to all the photos which reside inside that folder?
I actually did this with thousands of photos several years back (doing a rough organizing in Adobe Bridge with folder names used as brief descriptions), but can't remember how I did it.
 
Memory is returning. I believe this was a script not a plugin that John developed for me and a client. Contact John directly and ask about this. I no longer have the Script.
 
filepath.jpg

Isn't the 'From filepath to Keyword' script do this?
ptlite-icon_32.png
 
I think John needs to give his blessing on it and share it with the poster.
I think he already did by putting the whole script in the post i mentioned. Everyone could just copy it from there.
 
Should still work.

If I recall, I subsequently added the feature to my Search & Replace and was just about to post some screenshots when I found I have recently broken it. But it should (and will soon) copy from any field to keywords. With the folder path, it replicates the folder path as keywords.
 
Knew it would ;)

Here's how the plugin should look. After choosing Path to Keywords, you get a choice of where to start the path. In this case I don't want "R:" to be added to the keywords.
 

Attachments

  • SNAG-0000.jpg
    SNAG-0000.jpg
    105.8 KB · Views: 164
Thanks John and to everyone else who replied.
I am however a little confused....

1) Which script exactly are we talking about?
I copied the code which was linked from posting #5, but I don't recognize the screenshot from posting #4 which says "From filepath to keyword". Mine says "File path to keywords"
file path to keywords.png



2) Where do I get access to the script's settings as shown in posting #10?
I would like to only have the name of the folder and not any path at all. I assume I need to select the photos I want to affect, then click on the "Scripts" icon in the menu-bar and then click on "File path to keywords" which immediately runs the scripts and adds a full path along with the folder's name.
 
Last edited:
2) Where do I get access to the script's settings as shown in posting #10?
I would like to only have the name of the folder and not any path at all. I assume I need to select the photos I want to affect, then click on the "Scripts" icon in the menu-bar and then click on "File path to keywords" which immediately runs the scripts and adds a full path along with the folder's name.
I think it is the same script. Just the Script label has been changed. Basically it will parse the path into individual keywords (keyword1/keyword2/keyword3/filename) and assigned those keywords to the filename image.
 
Posting #10 shows the Search and Replace plugin. It also has an option to copy the Folder (or any other field) to Keywords.
 
Ah, I see.
So I can use it instead of the "File path to keywords" script and it has options for allowing me to do exactly what I'm asking (use only the folder name as keywords for the photos within it)?
The difference being that the "File path to keywords" script is free (but non-configurable, and always adds the entire path to the keywords) while the "Search and replace plugin" does what I want but costs EUR 25?
 
You can freely edit the script ("path" is the term you'd need to use). The plugin does a lot more and means there's no need to understand any code.
 
Thanks. I'll look into the script and see although I'm no programmer...

I successfully installed the trial version of your "Search and replace" plugin and got to try it out!
Being a while since I've used LR plugins I found that you had to select the photos to affect, then go to File - Plugin extras - Search + replace, append, transfer which pops up the configuration menu for it.

I followed your screenshot in posting #10 and pressed the "Process 8 photos" button (upper right corner) for the 8 photos I had selected, and a new window popped up asking me at which path level depth I wanted the naming (i.e. include the name of the folders before the one with the photos in it).
Is it possible to just set this instead of having it ask every time? With hundreds of folders it gets time consuming to (a) enter the menu above and (b) choose the path-depth every time, when each time I want to do the same thing. Maybe there's a simpler way to make the plugin do its thing?
 
That screenshot example showed the path in the drop down box, but I then noticed you only wanted the folder. Folder is also a choice from the drop down box and would not display that extra dialog box.
 
OK, I've tried it out with "Folder" instead, but there's still a dialog box popping up, although a different one. After trying various combinations, these are the settings that worked for me:
srt setup.png


and for the dialog popup which follow after pressing "Process 2 photos":
folder keywords popup.png


I noticed that if you click on multiple folders within LR (which will show all photos from only within those folders), then press CMD-A (Select all, or CMD-A I suppose on a PC) I can run the plugin and need to spend less time going into the File - Plugin extras - Search + replace, append, transfer menu in order to add keywords for more photos which will save a lot of unnecessary menu clicking!
 
By the way, do you mind if I discuss modifying the "File path to keywords" script mentioned here and which you posted earlier here?

Although I'm not into programming I can understand some of the basics, but see that it's not obvious from the code what to do with "path" (so as to eliminate the file-path in the keywords).
I just need this one function for organizing my photos, so all the additional features of the "Search and replace" plugin might be overkill.
 
The difference being that the "File path to keywords" script is free (but non-configurable, and always adds the entire path to the keywords) while the "Search and replace plugin" does what I want but costs EUR 25?
John won't ask, but don't you think EUR 25 is a fair price to pay for any ones talents that can create a custom script or Plugin? IMO, Lightroom Plugin authors are an underpaid talent that the rest of us ought to be supporting financially.
 
Absolutely!
I do appreciate John's efforts, but as I only need that single feature of the plugin the other script might do (although with a modification).
I just wanted to ensure the author was OK with online discussions on modifying it (or if he'd rather not).
 
It's no big deal to me if you discuss modifying that script. I just won't participate myself - it's free, unencrypted, educational, unsupported etc. Basically you're just going to need to get it to look for the term 'folder' instead of 'path'.
 
Thanks John :)
 
Status
Not open for further replies.
Back
Top