Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to export folder of multiple albums from Photos

I have Photos Version 2.0 (3130.0.240) on a desktop Mac with O.S Sierra 10.12.3.


I have arranged and organized many photos in the Mac Photos program into multiple Folders which are then broken down into subcategories or sub-folders with a couple of albums in each. See reference below -



Albums >

Vacation Photos (Folder) >

Bali Trip (Folder) > Albums > Photos (150 photos)

Sydney Trip (Folder) > Album > Photos (76 photos)

Brisbane Trip (Folder) > Albums > Photos (126 photos)

Vancouver Trip (Folder) > Albums > Whistler Photos (48 photos)

> Van City Photos (96 photos)


How do I then export the core folder of 'Vacation Photos (Folder) >' to an external hard-drive and so someone else can have a copy of them in the high quality so they can import into their own photo album and maintain all of the sub-folders/categories?


null-OTHER, iOS 10.2.1, Mac Photos Version 2.0

Posted on Mar 15, 2017 4:19 PM

Reply
28 replies

Sep 6, 2017 9:54 AM in response to mzurkirchen

Nothing - the original dates are included in the photo EXIF/IPTC data and will be shown when you use any photo software to view the photos metadata


The file metadata which you are looking at has nothing to do with the Photo metadata nor can Léonie's script modify the file meta data - there is third party software you can acquire that can set file metadata to match the Photo metadata


LN

Nov 24, 2017 6:47 AM in response to estut

But, as you probably know, the time & datesettings changed to the actual date. Is there a way to keep the original photo information?

Not directly in Photos. Photos will usually keep the original file creation dates when exporting the original image files. But but if you export the edited versions, Photos needs to render a new image file, and this file will have the creation date of the export. But the the original capture date will be embedded as EXIF tag.


If you have Graphic Converter 10, you can use it to change the file creation date to the EXIF capture date.

Dec 4, 2017 4:24 AM in response to léonie

Hi Leonie


thanks for all the helpful hints / scripts so far. I'm using your script to export edited versions to the HDD and do further actions (sorting, renaming, archiving on NAS) using Hazel. The only remaining issue I have are videos. There are no EXIF information available after export showing original capture date. So what I'm trying to do is saving the original date into the Title (which I can do already) and export the video file with current name & Title as new name of the file.


This is what I don't get to work. I don't see any reference to the filename at all, so I have no clue how to concatenate name and title. Can you please help?


This seems to be the relevant part of the script saving file to the drive:

tell application "Photos"
if albNames is not false then -- not cancelled
repeat with tName in albNames
set tFolder to dest & tName
my makeFolder(tFolder) -- create a folder named (the name of this album) in dest
if orig then
export (get media items of album tName) to (tFolder as alias) with using originals -- export the original versions
else
export (get media items of album tName) to (tFolder as alias) without using originals -- export the edited versions
end if
end repeat
end if
end tell

Thanks,
Thomas

Dec 4, 2017 5:10 AM in response to léonie

Thanks for your quick answer.


I've seen those scripts beforehand, cause I tried to get this solved by myself already.


My issue is, that I'm not able to adopt the mechanism of those scripts into my export script. I do not see where the file name of the exported file is specified and do not know how to bring filename and Title together during the export.

Dec 4, 2017 5:48 AM in response to kingshill_de

My issue is, that I'm not able to adopt the mechanism of those scripts into my export script. I do not see where the file name of the exported file is specified and do not know how to bring filename and Title together during the export.

The Apple Script dictionary for Photos does not allow to specify a new filename on export or even to specify, that the current title should be used as the filename.

This is all that can be specified for the export using a script:

export v : Export media items to the specified location as files


export list of media item : The list of media items to export.

to file : The destination of the export.

[using originals boolean] : Export the original files if true, otherwise export rendered jpgs. defaults to false.

For your videos you could modify the provided scripts to change the title of the video to the date plus the filename.

For example - for a list of selected videos you can change the title to the capture date plus the filename like this:


tell application "Photos"


activate

set imageSel to (get selection) -- get selected images r videos

if imageSel is {} then

error "Please select some images."

else

repeat with next_image in imageSel


-- retrive the date

set capture_date to (the date of next_image)

set short_capture_date_string to the short date string of capture_date


-- set capture_time_string to the time string of capture_date

set fname to the filename of next_image

set new_title to short_capture_date_string & "-" & fname


tell next_image

set the name to new_title as text

end tell

end repeat


-- return new_title

end if

end tell



Then export your videos manually from Photos with "File > Export, and file naming: Use title.

Dec 4, 2017 11:26 AM in response to léonie

That's what I thought - thanks for clarifying. I guess I have to live with the wrong creation date for the time being. I use many albums for many videos and it's not the way fwd exporting them manually.


As good as most things work on a Mac: Some things remain strange to stupid (e.g. I don't understand why pictures keep the creation date and movies don't. Both are converted during export so I don't see a reason for different behavior.) But that's an Apple thing.


Again, thanks for your quick and great support.


Cheers

Thomas

Dec 23, 2017 5:19 AM in response to martinfromaeschi so

That would require a bit of programming. Right now this line takes the complete list of all photos in an album (get media itemsofalbumtName) and writes them as the originals into to folder tfolder.

There is no command in the AppleScript dictionary for Photos to use the title as filename.

You would have to program a loop to construct a new filename from the title, and use this new filename in the "to file" part of the export statement.


See the dictionary for scripting Photos:





exportv : Export media items to the specified location as files

export list of media item : The list of media items to export.to file : The destination of the export.[using originals boolean] : Export the original files if true, otherwise export rendered jpgs. defaults to false.

How to export folder of multiple albums from Photos

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.