tell application "Photos"
set media_item_list to selection
set names_text to ""
repeat with mi in media_item_list
set str to name of mi
if str is missing value then set str to filename of mi
set names_text to names_text & str & return
end repeat
set the clipboard to names_text
end tell