Twice recently I’ve seen people asking about getting a simple list of filenames to copy and email, and I wrote this little script for one of them. But I just saw someone asking again, so here it is (zip file) – free in celebration of my having gone through January without a beer, glass of wine, sip of single malt etc.lrdownload

In your LR application support folder (find it by Preferences > Presets > Show Lightroom Presets Folder), create a folder called Scripts. This new folder should be in the same Lightroom folder as ones like Smart Collection Templates, Text Style Presets etc.

Unzip the file and save the little lua file in there, restart LR and you’ll have a scripts menu to the right of Help. Select a bunch of pictures, run the Filenames script, and you’ll see something like this:

Screen Shot 2013-01-31 at 19.15.23

 Update (to celebrate Pancake Day)

You can easily modify this script to get other fields. The key line is getFormattedMetadata(‘fileName’) where the script calls a function and passes LR’s internal field name as an argument. So you just need to copy the script and change that field name?

sdkWell, not quite. How do you know the internal field names? And some fields need to be called with the getFormattedMetadata function, others with getRawMetadata. So while you can guess the field name or work it out by editing a metadata template in Notepad/TextEdit, you really need to look up the field in the Lightroom 4 SDK under LrPhoto.

In the comments Hans asked about the full folder path, so in this case you’d just change getFormattedMetadata(‘fileName’) to getRawMetadata(‘path’). Restart LR and you’re done.

Incidentally, if you have Photoshop or the Creative Suite, you can use the Extend Script Toolkit as your editor instead of Notepad/TextEdit. It allows you to format the code for Lua and it’s not over the head of those like me who’re unnaturally frightened of real programmers and their very clever integrated editing environments.