Skip to content

Instantly share code, notes, and snippets.

What would you like to do? 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