From: Sasha on
Just came to the same problem as noted at
http://www.eggheadcafe.com/software/aspnet/30208939/reading-pimvol--edbfil.aspx

I found the english text and numbers are plain text in pim.vol file.

As result I made a small program that parse binary data well and gives tel numbers as result (first it gives numbers from last calls list and then contact list):

sasha(a)lt:~/software/htc/contact$ perl parse_pim.pl pim.vol
Start parsing..
89035450000;Vlad
89105440000;Aaa

ANDREI;89167750000
Alexey Maks;90589265000000
....


The program is:

exit "Usage: parse_pim.pl filename" unless $ARGV[0];

print "Start parsing..\n";

my $cond = "wait";
my $contact = '';
my %contacts;

open(F, "<".$ARGV[0] );

my $s;
while(read(F, $s, 1) ) {

while($s =~ /./g) {
if( ord($s) == 8 && $cond eq "wait" ) {
$cond = "zero";
} elsif ( ord($s) == 0 && $cond eq "zero" ) {
$cond = "start";
} elsif ( $cond eq "zero" ) {
$cond = "wait";
} elsif ( ( $cond =~ /^start|read$/ || ( $cond > 0 && $cond < 6 )) && ( ( ord($s) >= 48 && ord($s) <= 57 ) || ( ord($s) >= 97 && ord($s) <= 122 ) || ( ord($s) >= 65 && ord($s) <= 90 ) || ord($s) == 32 ) ) {
$contact =~ /(.)$/;
if( ( ord($1) < 48 || ord($1) > 57 ) && ( ord($s) >= 48 && ord($s) <= 57 ) ) {
$contact .= ';';
}
$contact .= $s;
$cond = "read";
} elsif ( $cond eq 'read' ) {
$cond = 1;
} elsif ( $cond >= 4 ) {
$cond = "wait";
$contacts{$contact} = 1 if $contact =~ /\d{5,}/ && $contact =~ /\w+/;
$contact = '';
} elsif ( $cond > 0) {
$cond++;
}
}
}

close(F);

for my $contact (sort keys %contacts) {
print $contact."\n";
}

# I translated the result to Outlook contact list then (because it is possible to synchronize Outlook contact list with my htc3300 WM5 device). Next steps:
# 0. I created CSV template file (with required fields) using Outlook contact export to CSV first. helped me
# 1. I translated the perl prg output to CSV file
# 2. I imported CSV to Outlook contact list.
# 3. I synchronized htc3300 contact list with outlook.

Sasha.

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com