Looking at my Contacts app I realised that I have nearly 2000 of them. These have been collected over the years and I can’t now remember who many of these people are. I am thinking that perhaps I should have a clear out!
Contacts apps are so quick at searching that I have become lazy and just keep on adding new ones without getting rid of the old.
Do you have a regular tidy up in Contacts or just leave it to build up safe in the knowledge that you will always find what you are looking for?
Notes (and often Nicknames too) for my Contacts, and they all get put into Contact Groups (sometimes multiple groups).
I never delete contacts, even for old ones belonging to people I’ve forgotten. If you want to clean up your contacts but want to retain them (and recognize a call from one of them) put unknown/forgotten people into a Who? group then don’t search in that group when using the app.
Every few months I make a pass and clear a few of the contacts that are obsolete in terms of info or that it is unlikely that I will ever need to contact again. I tend to be pretty conservative in my choice so if I hesitate even a little bit I just leave it and move to the next. Eventually I won’t hesitate and it will go
We moved about 2 years ago and I took that opportunity to purge my contacts (which numbered around 1800-2000, I think) of everyone except immediate family and a few close friends.
Two years later, I have about 300. That number is inflated somewhat because I have all of the active members of my congregation in there for caller-ID purposes, in addition to being able to call them without referring to the church’s printed directory of names and numbers.
I run a script¹ every night which saves each contact as individual vCards to a specific folder in Dropbox.
Since I have that “archive” I am fairly quick to delete a contact that I no longer think that I need, because if I ever change my mind, I can go into that folder, double-click on the vCard, and re-add it to my contacts.
(The script does not delete vCards, only exports them, so if I delete someone from my contacts, their vCard will still be in the archive.)
I will especially do that if the name confuses Siri when I try to call someone using by name, but it also makes it much easier to find someone’s email when composing a new message if you only have contacts you actually contact.
¹ Here’s the script. I copied it almost entirely from another forum post at some time in the past. If you change the $DIR variable, be sure to change the set vPath line too.
#!/bin/zsh -f
DIR="$HOME/Dropbox/Backups/vCards"
[[ ! -d "$DIR" ]] && mkdir -p "$DIR"
# Don't Indent - BEGIN
/usr/bin/osascript <<EOT
set vPath to (path to the home folder as string) & "Dropbox:Backups:vCards"
alias vPath
tell application "Contacts"
repeat with cardPerson in people
set nameOfvCard to name of cardPerson & ".vcf"
set outFile to (open for access file (vPath & ":" & nameOfvCard) with write permission)
write (vcard of cardPerson as text) to outFile
close access outFile
end repeat
quit
end tell
EOT
# Don't Indent - END
When I retired, I archived and removed those business contacts that I was certain I would never need again. Other than that I tend to keep everything else.
I run it via launchd every day at midnight, but you could just as easily run it via Keyboard Maestro if you wanted. In fact, that’s probably the easier way to do it. Just sent a time of day trigger.
I apologize, I need more help to get this to work. What part of the script do I need to change to make it unique to me? Also, this is bash right or do I need to have Zsh?
Do I change
to
“/Users/bocciaman/Dropbox/Backups/vCards”
Also, in Keyboard Maestro I choose Bash script right?
No apology necessary. This stuff isn’t obvious, and it’s not always clear to me which parts people will need help with, so it’s useful to get feedback from someone trying to use it themselves.
You should keep it zsh. But it’s been installed on Mac OS X for years, so it’s there already even if it’s not your default shell.
Ideally you should not have to change anything for it to work on your computer, if I written it well.
The variable $HOME will automatically adapt to /Users/bocciaman on your computer and /Users/luomat on mine, so you don’t need to change that part.
You can change the ‘Dropbox/Backups/vCards’ part to something else if you want the files to be saved somewhere else.
Yes, although I think it’s called “execute shell script”, but same idea.
Let me know if it works or doesn’t. If it doesn’t, I can try running it in Keyboard Maestro here, and see if I can debug it that way.
I only clean up Contacts when I stumble across a problem or am in the mood — once every few years or so. It just doesn’t seem worth the effort to spend a lot of time on it. Before I do a big cleanout, I archive every card and throw it into a folder, just in case.
However, I have begun to more aggressively use the Notes field to record the date of various services. For example, a medical specialist will get entered into contacts so Caller ID works properly, and I’ll note what I saw that physician for and the year.
I also use Notes for keywording — the guy who cleans my gutters does not have that word in the business name, which I can never remember. But since I put “gutters” in the Notes field, I can search contacts for “gutters” and quickly call him. Since you cannot create a Group in Contacts on iOS, these pseudo-keywords are the only way to organize contacts.
set vPath to (path to home folder as text) & "Dropbox:Backups:vCards:"
do shell script "mkdir -p " & quoted form of POSIX path of vPath
tell application "Contacts"
set {contactNames, vCards} to {name, vcard} of people
quit
end tell
set treatedNames to {}
repeat with i from 1 to (count contactNames)
set bareName to (item i of contactNames)
if bareName is in treatedNames then
set nameOfvCard to bareName & "_" & i & ".vcf"
else
set end of treatedNames to bareName
set nameOfvCard to bareName & ".vcf"
end if
set outFile to (open for access file (vPath & nameOfvCard) with write permission)
try
set eof outFile to 0
write (item i of vCards) to outFile as «class utf8»
end try
close access outFile
end repeat