其中有一個同好,他寫了一段小程式,好像是用C語言寫的,
他的這個小程式可以把pim.vol裡面的聯絡人資料匯出成一個文字檔,
匯出來的文字檔經過Excel與Outlook的轉換,就可以把聯絡人還原。
很可惜的是,我還是不會使用這段小程式,有興趣的人可以試試看。
也許你可以把使用方法寫出來,照福大家。
原文引用
http://www.eggheadcafe.com/software/aspnet/30208939/reading-pimvol--edbfil.aspx
Parser for pim.vol - Sasha N
24-Oct-07 124152
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@lt~softwarehtccontact$ 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 =~ ^startread$ ( $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.
內文搜尋
X




























































































