Created
February 5, 2020 17:32
-
-
Save henrik/85dcf6c4af2e5ee03d13a1d49d18bdcc to your computer and use it in GitHub Desktop.
JXA script (JavaScript AppleScript) to set Photos.app titles ("names") from filenames, but changing the first letter to uppercase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Photos = Application("Photos") | |
var currentSelection = Photos.selection() | |
for (var item of currentSelection) { | |
const oldFilename = item.filename() | |
const newFilename = oldFilename.charAt(0).toUpperCase() + oldFilename.slice(1) | |
item.name = newFilename | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment