Since last "run"....


This is my first post, so bear with me if already answered somewhere else:)

I have created a small “Add new pictures to iPhoto” script. It looks like this:

  1. Ask for confirmation that my NAS shares are mounted, if yes go on,
  2. Find Finder Item, where - in my picture share, whose - Kind is Image, AND, date modified is today.
  3. Add Photos to Album

This works if I add pictures to my share which were taken today, and I run the script. However, if I have taken pictures over a few days, and add these to the share, and run the script, it only finds the ones which were taken today. This is because the Date Created and the Date Modified are the same.

Is there a way I can ask in step 2, that it finds all pictures whose date created/modified is since the last time I ran the script? Or any other ideas how to add pictures to iPhoto, which I have put onto a NAS share, and not get all my pictures in the results list. BTW - I run iPhoto without “copy items to the iPhoto library”, and keep all my originals on my NAS share (35’000 pictures).

Thanks in advance,



try something like this, the persistence of property works reliably, if the script is saved as an application

property lastRun : missing value


tell (current date) to set today to it - (its time)
if lastRun is missing value then
end if
set lastRun to current date

Hi Stefan,

Thanks for your help, but I am using Automator, as I don’t know Applescript.

I did try though, but perhaps I haven’t replaced all of the variables that are specific to my setup, as it fails running.

BTW - I live in Gams, and we are looking for a good Bernen Sennenhund breeder, that’s what you have right?


You can automate your step number 1 as follows. This way you will only be presented with a dialog box if the NAS drive is not mounted.

set nasDiskName to "Backups" -- put the name of your nas drive here
if (list disks) does not contain nasDiskName then
	tell me to display dialog "Please mount the disk \"" & nasDiskName & "\" before proceeding" default button 2 with icon caution
end if