Copy and paste files automatically based on folder changes

I’ve searched the form and haven’t found an answer (and am a KM noob), so forgive me if this has been addressed elsewhere.

I’m on a mac and use the Photos app as my primary photo storage. I’ve copied all the originals over to my Amazon photo drive as well to have backup. I’d like to set up a macro that will automagically copy and paste image files over to my Amazon folder anytime new images are imported into Photos. Can anyone help me set this up? I’d prefer it recognize new file additions rather than be triggered by a typed string or hotkey.


Hey Morgan,

I’m skeptical about making your process automatic.

There’s no built-in API that announces when an import has occurred, so you’d have to kludge something – and I think the chances of fouling up your data is too great.

I think you can probably use a little AppleScript to work with the Last Import Album to manually do what you want.

Take a look at this thread to get an idea of what can be done:

Editing images inside ‘ for OS X’ using Photoshop

How are you accessing your Amazon Photo Drive?


Thanks, Chris. I’m as knowledgable about Apple scripts as I am about KM unfortunately. I use the Amazon Drive app, which function much like Dropbox or Google Drive in that I have a folder on my hard drive that syncs with my Amazon account online. Anytime something is added to the folder, it syncs to the online account.

I looked at the thread you suggested and to be honest, it is very confusing to me. Is this what I would use? And if so, do I have to go into photos and select a specific album or collection each time? Not quite sure I understand…

1 Like

take a look to Hazel -

Hey Morgan,

Okay, we can work with that.

That's not surprising if you're new to AppleScript.

If you want to properly automate the process.

No – I think it will be easy enough to work with the “Last Import” album.

The workflow would be:

  1. Import something into photos.
  • Run the macro.

Before I look into this further – does the Amazon Drive app have an icon in the Share menu?

MenuBar > File > Share > Amazon_Drive


Okay, here's where I show you just how noob I am... :grimacing:

Where might I find this? MenuBar > File > Share > Amazon_Drive

Amazon drive does have an icon in the menu bar at the top however, if that's what you mean.

Hey Morgan,

Sorry – in the Photos app.

Does Amazon Drive show up in the Photos share menu?


Nope, no Amazon sharing capability within Photos. Does that mean I’m SOL?

Hey Morgan,

Not at all. I just wanted to rule out the easy way before moving on to the more difficult path.

I'll come back to this when I'm done with some other chores.


Hey Morgan,

I've finally had time to work on this.

Take note of the keyboard shortcut triggers in the macros, and change them if desired.

This first macro selects the “Last Import” album, so you can inspect it before exporting.

** The sidebar MUST be open for it to work.

Photos – Select “Last Import” Album.kmmacros (5.5 KB)

This second macro performs the export of all items in the “Last Import” album to a date-stamped folder:

~/Amazon Drive/<date-stamped_folder>

** Do NOT try to alter the script without knowing what you're doing – I'll help you make any needed changes.

Photos – Export “Last Import” Album to Amazon Drive Folder.kmmacros (7.9 KB)


So it’s only taken me 6 months to see this, but THANK YOU!

1 Like