• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Deletion of Contacts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deletion of Contacts


  • Subject: Re: Deletion of Contacts
  • From: debt <email@hidden>
  • Date: Thu, 08 Sep 2016 22:06:55 -0700

Persistence pays.  I finally got it.  This will delete every contact in the group whose date created is older than 30 days.

Marc



set the today to current date
tell application "Contacts"
set the_people to every person in group "FileMaker"


repeat with the_person in the_people
set date_created to (value of custom dates of the_person whose label is "created")
if date_created is not {} then
set diff to (today - date_created)
if diff > 2592000 then
delete the_person
end if
end if
end repeat
save


end tell




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Deletion of Contacts
      • From: Andrew Oliver <email@hidden>
References: 
 >Deletion of Contacts (From: debt <email@hidden>)
 >Re: Deletion of Contacts (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Deletion of Contacts
  • Next by Date: Re: Deletion of Contacts
  • Previous by thread: Re: Deletion of Contacts
  • Next by thread: Re: Deletion of Contacts
  • Index(es):
    • Date
    • Thread