Created
October 29, 2017 06:57
-
-
Save freklov/a163eab884e932f1022bb50c37ccf15a to your computer and use it in GitHub Desktop.
AppleScript for Apple Contacts: Export all contacts as individual vCards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- requires a folder "vCards" on the user desktop | |
-- | |
set desktopPath to (path to the desktop folder as string) & "vCards" | |
alias desktopPath | |
tell application "Contacts" | |
repeat with cardPerson in people | |
set nameOfvCard to name of cardPerson & ".vcf" | |
set outFile to (open for access file (desktopPath & ":" & nameOfvCard) with write permission) | |
write (vcard of cardPerson as text) to outFile | |
close access outFile | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment