VCard Splitter

The very first problem after buying a new nokia E51: how to import contacts from my old Motorla. Solved with KMobileTools and a little Perl script.

The problem

Nokia puts into their Symbian phones an utility called Transfer. It allows you to import your contacts list from a compatible Nokia device. But as my previous phone was a Motorola, this couldn’t work. Without Windows at hand I could not even check if the PC Suite has any means to deal with this.

In my Linux environment there’s the standard utility to deal with all cellulars: KMobileTools. There’s also something called GNokii for GNOME users. KMobileTools is pretty universal and reliable - worked without glitch on all my previous phones. It allows you to import/export your address book, messages and to make calls/write messages directly from KDE. But it can’t put your contacts into a S60 device (probably other Symbians too).

The idea

Virtually all phones today (Motorola F3 is the only exception that comes to mind) can receive VCards. The E51 is no exception here - it does even take them from the memory card.

KMobileTools has to somehow store contacts on the disk. It turns out, that the format it uses is a flat file of newline delimited VCards. It even does simple version control, so you never lose any contacts.
Nokia can not read such a file directly. Only the first contact on the list gets added.

The solution

Overall, the procedure is quite simple. It comes down to few simple steps:

  1. Import your phonebook from previous phone with KMobileTools
  2. Copy the flat file into working directory:
    cp ~/.kde/share/apps/kmobiletools/kmobiletools.vcf .
  3. Create the script copy-pasting from below. Sometimes it turns out, that name and surname come switched - if so, uncomment the middle line (remove the leading #):
    kate splitter.pl
  4. Run it, this will create a subfolder called vcards:
    perl splitter.pl
  5. Copy it into the phone’s memory card.
  6. On the phone run: Main menu -> Office -> File Manager. Navigate to the folder you just uploaded. Clicking on each vcf file will open the contact info, another two clicks will get it imported. Iterating through all the files can take some time - something to do while commuting…