Skip to main content
raldo
Participating Frequently
April 18, 2017
Answered

Backslash/Forward slash as hierarchical tag

  • April 18, 2017
  • 1 reply
  • 1065 views

I have tagged thousands of photos using a hierarchichal keyword scheme. Example: !Events/Birthday

Lightroom does not display and recogize this as a hierarchical keyword. Even after I select the option edit\Preferences\FileHandling\Treat'/'AsAKeywordSeparator

Does this only work on Import? Any ideas?

This topic has been closed for replies.
Correct answer johnrellis

If you're using forward slash, you don't need to reimport -- just select the files and do Metadata > Read Metadata From File.

If you're using backward slash, you'll have to use the steps I outlined above.

1 reply

johnrellis
Legend
April 18, 2017

Does this only work on Import? Any ideas?

That's right.  The description in Preferences > File Handling says:

By "reading metadata", that's referring to the command Metadata > Read Metadata From File.  So LR will interpret "/" as a hierarchical separator when importing pics or using the Read Metadata From File command.  (It never interprets "\" as a hierarchical separator, and I've filed a bug report on that.)

When entering keywords in LR's Keywording panel (right column of Library), you need to use "<" or ">" as the hierarchical separator.  To enter the hierarchical keyword A > B, you could type "A > B" or "B < A" (in both cases, A is the parent and B is the child).

If you want to correct the thousands of photos you've already tagged using "\", you could do the following:

1. In LR, select all the photos and do Metadata > Write Metadata To File.

2. Use ExifTool to remove the fields XMP:Subject and IPTC:Keywords from the photos, leaving just the field XMP:HierarchicalSubject.

3. Use ExifTool and some other command-line tools like "sed" to replace all occurrences of "\" with "|" in XMP:HiearchicalSubject.  This step requires you to be experienced with command-line scripting and to invest at least an hour learning ExifTool, if you don't know it already.

4. In LR, select all the photos and do Metadata > Read Metadata From File.

Of course, make sure you've backed up your catalog and all your photos before you start this.

raldo
raldoAuthor
Participating Frequently
April 18, 2017

Ok. I'll just check the checkbox and reimport.

johnrellis
johnrellisCorrect answer
Legend
April 18, 2017

If you're using forward slash, you don't need to reimport -- just select the files and do Metadata > Read Metadata From File.

If you're using backward slash, you'll have to use the steps I outlined above.