Deletion of Contacts
Deletion of Contacts
- Subject: Deletion of Contacts
- From: debt <email@hidden>
- Date: Thu, 08 Sep 2016 15:30:50 -0700
I’m trying to delete old records in Contacts. I’ve created a custom date field called “created” which gets populated upon creation. What I want is a script that goes through all the records in a particular group and deletes all records (not just from the group) that are over 30 days old. Unfortunately, I can’t get it to work. Here’s my latest attempt, without adding code for the group:
set the today to current date tell application "Contacts" repeat with the_person in people set created to (custom date of the_person) set diff to today - created if diff > 2592000 then delete the_person end if end repeat end tell
The format of the custom date is m/d/y. Is it a date format mismatch or do I have another problem?
Thanks, Marc
OSX 10.11.6 |
_______________________________________________
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