Skip to content

Instantly share code, notes, and snippets.

@henrik
Created June 22, 2021 19:21
Show Gist options
  • Save henrik/fc935e65ed8bf10b8c5c2f67ea22ce7a to your computer and use it in GitHub Desktop.
Save henrik/fc935e65ed8bf10b8c5c2f67ea22ce7a to your computer and use it in GitHub Desktop.
Photos.app: Set name to filename if name is missing. Since otherwise sorting by name will sort nameless photos first, but still show the filename as a grayed-out name…
tell application "Photos"
repeat with x in every media item
if name of x is missing value then
set name of x to (filename of x)
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment