View Single Post

  #6  
Old 04-09-2011, 07:25 PM
kofolamaster kofolamaster is offline
Registered User
 
Join Date: Sep 2011
Posts: 1
kofolamaster is on a distinguished road
Bump. Again. This time with Nokia E66.

Nevertheless, multiple contacts VCF can be easily splitted without use of any specialised software (as long as you use linux or cygwin).


--- content of vcf_splitter.sh shell script:

#!/bin/dash

VCFILE="PB_Backup.vcf"

for i in `grep -n '^BEGIN:VCARD' "$VCFILE" | cut -d ':' -f 1`; do
j=`tail -n "+$i" "$VCFILE" | grep -ne '^END:VCARD' -m 1 | cut -d ':' -f 1`
tail -n "+$i" "$VCFILE" | head -n "$j" > "$i.vcf"
done


This will create multitude of numbered VCF files out of single PB_Backup.vcf. They should be copied onto memory card (on E66 to \Others\Contacts\) and then imported by "Contacts" -> "Options" -> "Copy" -> "From memory card".

--

for those eager to copy calendar too, here's the script


#!/bin/dash

VCFILE="all.vcs"

for i in `grep -n '^BEGIN:VTODO' "$VCFILE" | cut -d ':' -f 1`; do
j=`tail -n "+$i" "$VCFILE" | grep -ne '^END:VTODO' -m 1 | cut -d ':' -f 1`
( echo 'BEGIN:VCALENDAR' ; echo 'VERSION:1.0' ; tail -n "+$i" "$VCFILE" | head -n "$j" ; echo 'END:VCALENDAR' ) > "$i.vcs"
done

Last edited by kofolamaster; 05-09-2011 at 11:31 PM.