刚买的索爱U1出了一个难题,原来使用的索爱K850电话本,无法转到U1中来,K850导出的电话本文件,U1只能转入{dy}个联系人,反复N次无果。用蓝牙,每次只能发送一个号码,两天只发了不到一百个号码,郁闷呀! 反复查看U1电话本,发现U1电话本,选择“移动客服电话(10086)”-选项-复制名片-至其他记忆库,选择E:盘,如果没文件,则直接拷贝;如果有文件,则提示删除选定库中的联系人,选择是,删除库中原有联系人。选择否则又复制一个新的联人“移动客服电话”-。 在记忆卡上可以看见“其他”目录下,新建一个“通讯录”文件夹,打开后可见刚刚复制的名片文件“移动客服电话.vcf”,打开后可见 姓 移动客服电话 手机 10086 同步 私人 用记事本打开后可见 BEGIN:VCARD VERSION:2.1 N;ENCODING=QUOTED-PRINTABLE;CHARSET=utf-8:=E7=A7=BB=E5=8A=A8=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D;;;; TEL;CELL:10086 X-CLASS:private END:VCARD 这是K850电话本保存的文件 BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;=E7=A7=BB=E5=8A=A8=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=A7=BB=E5=8A=A8=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D TEL;CELL:10086 X-IRMC-LUID:000200001478 END:VCARD BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;=E7=A7=BB=E5=8A=A8=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=A7=BB=E5=8A=A8=E5=AE=A2=E6=9C=8D=E7=94=B5=E8=AF=9D TEL;CELL:10086 X-IRMC-LUID:000200001478 END:VCARD …… 两个对比,差距还很大 因U1电话本,支持多个单个电话文件一起复制,不支持K850的单个电话本文件一次复制多个电话本的功能。咋办?——想办法吧! 先把K850导出的电话本文件,用软件分成单个文件,再改成U1格式,存盘。 软件当然了要自己编了。 把源代码贡献给大家,编程软件是vb2008,新建一个windows窗体应用程序,添加一个button即可。 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i, j, m As Integer Dim wenjianming As String Dim wenjianming1 As String Dim duquwenjian(), baocun() As String wenjianming = "e:\PB_Backup.vcf" ‘K858电话本导出文件存放路径 wenjianming1 = "e:\aaaaa\" '生成的U1格式电话本文件集合 If My.Computer.FileSystem.DirectoryExists(wenjianming1) = False Then My.Computer.FileSystem.CreateDirectory(wenjianming1) '判断目录是否存在并建立 duquwenjian = File.ReadAllLines(wenjianming) i = 0 m = 0 Do While i <= UBound(duquwenjian) If duquwenjian(i) = "BEGIN:VCARD" Then j = 0 ReDim baocun(j) baocun(j) = duquwenjian(i) j += 1 ElseIf duquwenjian(i) = "END:VCARD" Then ReDim Preserve baocun(j) baocun(j) = "X-CLASS:private" j += 1 ReDim Preserve baocun(j) baocun(j) = duquwenjian(i) File.WriteAllLines(wenjianming1 + CStr(Format(m, "000000")) + ".vcf", baocun, System.Text.Encoding.ASCII) m += 1 ElseIf Mid(duquwenjian(i), 1, 5) = "N;CHA" Then ReDim Preserve baocun(j) baocun(j) = Microsoft.VisualBasic.Left(duquwenjian(i), 2) baocun(j) = baocun(j) + Mid(duquwenjian(i), 17, 25) baocun(j) = baocun(j) + ";CHARSET=utf-8:" baocun(j) = baocun(j) + Microsoft.VisualBasic.Right(duquwenjian(i), Len(duquwenjian(i)) - 43) If Mid(duquwenjian(i + 1), 1, 1) = "=" Then baocun(j) = baocun(j) + Microsoft.VisualBasic.Right(duquwenjian(i + 1), Len(duquwenjian(i + 1)) - 1) i += 1 End If baocun(j) = baocun(j) + ";;;;" j += 1 ElseIf Mid(duquwenjian(i), 1, 5) = "FN;CH" Then If Mid(duquwenjian(i + 1), 1, 1) = "=" Then i += 1 End If ElseIf Mid(duquwenjian(i), 1, 5) = "X-IRM" Then Else ReDim Preserve baocun(j) baocun(j) = duquwenjian(i) j += 1 End If i += 1 Loop End Sub 运行软件,很快得到多个电话本文件。 把得到的多个电话本文件,拷贝到手机卡上“其他”目录下的“通讯录”目录下,进入手机电话本,选项-复制名片-从其他记忆库,选择E:盘。 天那,辛苦了几天,没导入的电话号码,全都进入了U1的通讯录。太爽啦,跟大家分享一下。 |