How to batch change filenames in a second Photos library

I have created a second PHOTO LIBRARY on my MACBOOK PRO. I now want to batch change the filenames, minus the extension, to the blank title fields. I've seen various scripts to do this, but they all operate on the Photos Library.photoslibrary not on Photos Library 2.photoslibrary

Is there a way I can select Library 2?

MacBook Pro 16″, macOS 26.1

Posted on Dec 11, 2025 7:12 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 11, 2025 7:20 AM

Photos scripting cannot target a library by name. It always acts on the open library. Open “Photos Library 2.photoslibrary” manually (Option-launch), then run your batch filename-to-title script. This is the only Apple-supported method.

4 replies

Dec 11, 2025 9:15 AM in response to ANARGET

That can be accomplished by the following:


1 - download the AppleScript Script: Changing the Title to the Filename without Extension.

2 - open Script Editor, import the code, compile and save as an application.

3 - open the second library.

4 - select the photos you want to batch change.

5 - double click on the created app to run the script on the photos.

6 - when you need the photos outside of the library with the new filename export it using the Title as the new file name.


If the file names are already what you want use this AppleScript: Script: Batch Changing the Titles to the Filenames with Extension


They both work fine with Sequoia and earlier.


Dec 11, 2025 7:31 AM in response to ANARGET

The Apple scripts for batch changing titles that I know of are targeting the Photos.app - they contain lines like "Tell application Photos to ... "


To use them you have to open the library you want to modify in Phoots, a pointed out by

azaksalmarzur28, then select the photos in Photos, where you want to change the titles and run the script.

How to batch change filenames in a second Photos library

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.