• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • The November 2019 Lightroom updates are now available. Lightroom Classic includes the ability to export the same photos as multiple sizes/formats in a single export, content aware fill for panorama edges and more. It does require a catalog format upgrade and there are updated system requirements, so you may want to wait a few days before upgrading.
    Lightroom (cloud-based service) has export options (such as TIFF format, renaming and color space), custom sort order on the desktop, copy/paste to multiple photos on iOS and more.
    The Missing FAQ and Edit Like a Pro eBooks are already updated for the changes.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom 6 questions. All the information you need is in Adobe Lightroom 6 - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. When you upgrade to subscription, there's also a Lightroom Classic version available.

Export to a folder based on metadata

atj777

New Member
Joined
Oct 6, 2019
Messages
6
Location
Sydney, Australia
Lightroom Experience
Advanced
Lightroom Version
6.x
Lightroom Version
6.12
Operating System
macOS 10.12 Sierra
I use the Job Identifier metadata field. I often use it as a suffix for the file names for images I export. I'd like to be able to create an Export Preset that uses the Job Identifier as a folder name and put all the images in the folder.

I was hoping that it could be done within Lightroom but I can't find it. Note that I am not attempting to mirror the folder structure of my collection.

I know I can do it as a Post-Processing app but it would be easier to do it within Lightroom.

Any ideas?
 
Joined
Oct 8, 2007
Messages
5,129
Location
London
Lightroom Experience
Power User
An export plugin could accomplish this, but I don't know of one that is designed to create folders based on a field such as job.

You'll have to test it for yourself, but the nearest one might be Jeffrey's "Folder Publisher" Lightroom Plugin or maybe Jeffrey has another one that will do it.
 

atj777

New Member
Joined
Oct 6, 2019
Messages
6
Location
Sydney, Australia
Lightroom Experience
Advanced
Lightroom Version
6.x
An export plugin could accomplish this, but I don't know of one that is designed to create folders based on a field such as job.

You'll have to test it for yourself, but the nearest one might be Jeffrey's "Folder Publisher" Lightroom Plugin or maybe Jeffrey has another one that will do it.
Thanks for the suggestion but this plugin doesn't do what I want: "This Lightroom “Publish” plugin allows you to export copies of your Lightroom photos to disk in a folder hierarchy that mimics the folder hierarchy in your Lightroom catalog."

Job is a criteria field in Smart Collections. You can create a HardDrive Publish Service which will let you create a Smart Publish Folder using the criteria {Job}{is}{(yourJobID value goes here)}
If I understand what you are suggesting, I would have to create a separate Smart Publish Folder for each and every Job Identifier. Or have I misunderstood how they work?

What I ended up doing was to create a Shell Script that gets run as post processing after the export. It extracts the Job Identifier from the filename of the exported file(s, creates the folder (if it doesn't already exist) and moves the file to the folder.
 
Joined
Jun 20, 2009
Messages
14,926
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Thanks for the suggestion but this plugin doesn't do what I want: "This Lightroom “Publish” plugin allows you to export copies of your Lightroom photos to disk in a folder hierarchy that mimics the folder hierarchy in your Lightroom catalog."


If I understand what you are suggesting, I would have to create a separate Smart Publish Folder for each and every Job Identifier. Or have I misunderstood how they work?

What I ended up doing was to create a Shell Script that gets run as post processing after the export. It extracts the Job Identifier from the filename of the exported file(s, creates the folder (if it doesn't already exist) and moves the file to the folder.
If you want a folder for each Job identifier, then LR needs the folder before the derivative is created (published) If you want something to detect the Job Identifier and create a folder if one does not exist or simply create the file in an existing folder, then LR does not have that builtin intelligence.
Lightroom will sort everything into Publish folders that you name in the Publish service but it won't derive the Publish Service folder name from the metadata on the fly.
 

atj777

New Member
Joined
Oct 6, 2019
Messages
6
Location
Sydney, Australia
Lightroom Experience
Advanced
Lightroom Version
6.x
If you want something to detect the Job Identifier and create a folder if one does not exist or simply create the file in an existing folder, then LR does not have that builtin intelligence.
But it could and easily. If you can choose the filenames it creates for exported images based on just about anything, including metadata, it could do the same thing for folders. Adobe just chose not to do that.

Anyway, thanks for the replies. My shell script is doing the job.
 

PhilBurton

Lightroom enthusiast (but still learning)
Premium Classic Member
Premium Cloud Member
Joined
Nov 16, 2015
Messages
1,863
Location
California, USA
Lightroom Experience
Intermediate
Lightroom Version
Classic
But it could and easily. If you can choose the filenames it creates for exported images based on just about anything, including metadata, it could do the same thing for folders. Adobe just chose not to do that.

Anyway, thanks for the replies. My shell script is doing the job.
Shell script? Are you invoking this script from inside Lightroom? Are you running this script from outside Lightroom and somehow controlling actions by Lightroom?
 
Joined
Jun 20, 2009
Messages
14,926
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Shell script? Are you invoking this script from inside Lightroom? Are you running this script from outside Lightroom and somehow controlling actions by Lightroom?
The script can be invoked in the Export panel "Post Processing" Section.
 

atj777

New Member
Joined
Oct 6, 2019
Messages
6
Location
Sydney, Australia
Lightroom Experience
Advanced
Lightroom Version
6.x
The script can be invoked in the Export panel "Post Processing" Section.
Indeed!

The script is executed once all the images have been exported and passes a list of filenames of the exported images.

I have two scripts (more for historical reasons due to a bug in earlier versions of Lightroom)

The first script simply goes through the list of files and calls a second script for each file, passing the filename

The second script:
  • extracts the path to the files
  • extracts the Job Identifier from the filename (I include the Job Identifier in each filename)
  • creates the folder (if it doesn't already exist)
  • moves the file to the folder (overwriting a file if it already exists)
This essentially does everything I would have liked Lightroom to have done other than checking and warning for existing files, however, if I always export the whole batch that is taken care of.
 
Top