tell application "Address Book" set i to 1 repeat with this_person in every person set i to (i + 1) set monfichier to (((path to desktop folder) as text) & "leon:" & i & ".vcf") set code to vcard of this_person my write_to_file(code, monfichier, false) end repeat end tell on write_to_file(this_data, target_file, append_data) try set the target_file to the target_file as text set the open_target_file to open for access file target_file with write permission if append_data is false then set eof of the open_target_file to 0 write this_data to the open_target_file starting at eof close access the open_target_file return true end try end write_to_file