Created
June 22, 2021 19:21
-
-
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…
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
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