Export to a folder based on metadata

Status
Not open for further replies.

atj777

Member
Joined
Oct 6, 2019
Messages
42
Location
Sydney, Australia
Lightroom Experience
Advanced
Lightroom Version
6.x
Lightroom Version Number
6.12
Operating System
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?
 
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.
 
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)}
 
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.
 
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.
 
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.
 
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?
 
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.
 
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.
 
Status
Not open for further replies.
Back
Top