Import Nextel iDEN Contacts to Google

Sprint is decommissioning it’s Nextel iDEN network in 2013. The Nextel network has been very popular with businesses for it’s push-to-talk (PTT) “walkie-talkie“-like service. Several rugged (and bulky) mobile phones like the Motorola i355 and i365 are well adapted to the sometimes harsh environments of field work and clumsy service technicians. Unfortunately it seems that many of these phones will outlive the network that supports them, leaving just SouthernLINC and a handful of small regional providers to offer any iDEN network service in the U.S. market.

It seems that everyone is switching to smartphones these days, and my office is no exception. One of the nicest features from an information technology standpoint about this new generation of phone is cloud integration. Frequently setting up one Exchange server or Google Apps account on the phone will synchronize calendars, contacts, and email. It soon became apparent while migrating the staff off their beastly “dumb”-phones that people were going to be spending a lot of time manually transferring their contacts from one phone to the other. To speed up the process I created a VBScript that works with the Motorola iDEN Phonebook Manager to export the phone book Jet database into a CSV file compatible with Google Contacts.

EDIT: Updated to add a kludgy work-around for 64-bit Windows


CSVname = "export.csv"
DBname = "import.mdb"

‘Optional Usage: iden2googlecontacts.vbs SourceDB TargetCSV

If WScript.Arguments.Count => 1 Then
    DBname = WScript.Arguments(0)
End If
If WScript.Arguments.Count => 2 Then
    CSVname = WScript.Arguments(1)
End If

‘So I guess this doesn’t work with the default WSH interpreter on 64-bit versions of Windows
If WScript.Arguments.Count < 3 Then
    Set objShell = CreateObject("WScript.Shell")
    If objShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") = "AMD64" Then

        Set fs = CreateObject("Scripting.FileSystemObject")
        If Not fs.FileExists(WINDIR & "\SysWOW64\wscript.exe") Then
            WScript.Echo WINDIR & "\SysWOW64\wscript.exe"
            WScript.Echo "Warning: Can’t find 64-bit Wscript.exe, this probably won’t work."
            Set colSystemEnvVars = Nothing
            Set objShell = Nothing
            Set fs = Nothing
            ‘The script won’t fork if there are 3 or more arguments on the command line
            Command = WINDIR & "\SysWOW64\wscript.exe "
            Command = Command & Chr(34) & WScript.ScriptFullName & Chr(34)
            Command = Command & " "
            Command = Command & Chr(34) & DBname & Chr(34)
            Command = Command & " "
            Command = COmmand & Chr(34) & CSVname & Chr(34)
            Command = Command & " "
            Command = Command & "NO_FORK"
            objShell.Run Command
        End If
    End If
End If
‘OK Things should be back to normal at this point

If InStr(CSVname, "") = 0 Then
    Set objShell = CreateObject("")
    CSVname = objShell.CurrentDirectory & "" & CSVname
    Set objShell = Nothing
End If

If InStr(DBname, "") = 0 Then
    Set objShell = CreateObject("")
    DBname = objShell.CurrentDirectory & "" & DBname
    Set objShell = Nothing
End If

Set fs = CreateObject("Scripting.FileSystemObject")
If Not fs.FileExists(DBname) Then
    WScript.Echo "Error: Database " & DBname & " was not found!"
End If
Set fs = Nothing

WScript.Echo "Exporting " & DBname & " to CSV file " & CSVname

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(CSVname, True)


objTextFile.Write("Name,Given Name,Additional Name,Family Name,Yomi Name,Given Name Yomi,Additional Name Yomi,Family Name Yomi,Name Prefix,Name Suffix,Initials,Nickname,Short Name,Maiden Name,Birthday,Gender,Location,Billing Information,Directory Server,Mileage,Occupation,Hobby,Sensitivity,Priority,Subject,Notes,Group Membership,E-mail 1 – Type,E-mail 1 – Value,E-mail 2 – Type,E-mail 2 – Value,Phone 1 – Type,Phone 1 – Value,Organization 1 – Type,Organization 1 – Name,Organization 1 – Yomi Name,Organization 1 – Title,Organization 1 – Department,Organization 1 – Symbol,Organization 1 – Location,Organization 1 – Job Description" & vbCRLF)

SQL = "SELECT ContactName, Number, NumberType FROM tblContactList WHERE NumberType<>1 AND NumberType <= 6;"

set oConn=CreateObject("ADODB.Connection")
oConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & DBname & ";"
Set oRS=oConn.Execute(SQL)

Do While Not oRS.EOF
    ‘Given Name
    ‘Additional Name
    ‘Family Name
    ‘Yomi Name
    ‘Given Name Yomi
    ‘Additional Name Yomi
    ‘Family Name Yomi
    ‘Name Prefix
    ‘Name Suffix
    ‘Short Name
    ‘Maiden Name
    ‘Billing Information
    ‘Directory Server
    ‘Group Membership
    ‘E-mail 1 – Type
    ‘E-mail 1 – Value
    ‘E-mail 2 – Type
    ‘E-mail 2 – Value
    ‘Phone 1 – Type
    Select Case oRS.Fields("NumberType")
        Case "0"
        Case "2"
        Case "3"
        Case "4"
        Case "5"
            objTextFile.Write("Work Fax")
        Case "6"
        Case else
    End Select
    ‘Phone 1 – Value
    ‘Organization 1 – Type
    ‘Organization 1 – Name
    ‘Organization 1 – Yomi Name
    ‘Organization 1 – Title
    ‘Organization 1 – Department
    ‘Organization 1 – Symbol
    ‘Organization 1 – Location
    ‘Organization 1 – Job Description
    objTextFile.Write("," & vbCRLF)
    i = i + 1

Set objFSO = Nothing

If i > 1 Then
    WScript.Echo "Exported " & i & " record"
    WScript.Echo "Exported " & i & " records"
End If

If oRS.State = 1 or oRS.State = True Then
        set oRS = Nothing
        set oConn = Nothing
End If

The Motorola iDEN Phonebook Manager is a free download, but you’ll need a cheap cable (available on eBay for under $5 for many phones) to dump the contacts off the iDEN SIM card.

Dock the phone to the USB cable and connect it to the computer you’ll be working with. You may be prompted to install additional drivers for your phone, but most of what you need will probably be included with the Motorola iDEN software download.

Open up Motorola iDEN Phonebook Manager and select “New/Edit Phonebook“.

Next select “Load From Phone“.

The software will prompt you to make sure the cable is connected between the phone and computer. Press “OK“.

An activity screen will open showing communication in progress between the computer and the phone.

The phone’s display may also show some indication of something unusual happening (as seen on an i355) or may just go blank (i365).

Once all the contacts are imported click the “Continue” button on the bottom of the window.

Select “Save To File“.

Pick a name for your file. I chose “import.mdb“, if you choose something else, you’ll have to edit the VBScript accordingly. Remember where you save the file.

Download and extract the iden2googlecontacts.vbs script into the same directory as your phone book export (“import.mdb” in this example).

Edit the script to change the input or output file names if required. When you are ready to run the script, double-click on iden2googlecontacts.vbs. The script will output the file names for verification, or warn you if it is unable to find the database to import contacts from.

When the script is complete it will tell you how many contacts it exported into the new CSV file (named export.csv by default).

Armed with the new CSV file export you just created, open up Google Contacts. under the “More” button choose “Import…“.

Click the “Choose File” button.

Navigate to the location where your export file was created and select the file (export.csv in this example). Click “Open” to proceed.

Click the “Import” button.

If everything worked OK, you should now see the new contacts. Click “Find & merge duplicates” to reconcile the import with any contacts the user may have already had in Google Contacts.

To be useful on the smartphone you may have to move these contacts to the “My Contacts” group label. Click the square selection box as shown below and then choose “All” to select all contacts.

Click the group button (the thing with three heads on it) and remove the check mark from the auto-generated label (shown here as “Import 9/28/12”). Place a check mark next to “My Contacts” and click “Apply

The contacts should all be removed from the auto-generated group label. You may optionally remove this group label now. Click the “More” icon again and choose “Delete group“.

Google will prompt you to confirm the deletion.

That’s it. Depending on the model of your mobile phone additional steps may be required to resynchronise your contacts with the server, but many phones handle this automatically.

If you are processing many phone books, consider the following command for batch processing

for %f in (*.mdb) do cscript iden2googlecontacts.vbs %~nf.mdb %~nf.csv

If you use this script and find it helpful (or run into problems), please let me know in the comments.







7 responses to “Import Nextel iDEN Contacts to Google”

  1. Vincent Avatar

    I’m getting an error
    Line 36
    Char 1
    Error Microsoft ODBC Driver Manager Data Source name not found and no default driver specified
    Code 80004005
    Source Microsoft OLE DB Provider for ODBC Drivers

    I am running Windows 7 Home Premium 64 bit.


    1. Chris Avatar

      Thanks for drawing this to my attention Vincent. Apparently this wasn’t working on 64-bit versions of Windows. Leave it to Microsoft to require an interpreted script to be architecture aware. Anyhow, I’ve added a workaround that seems to work on my Windows 7 Professional 64-bit system. I suspect this will work for you as well.

      Mischief managed, now to return back to the comfort of Linux…

  2. Bat Avatar

    Have been using iDen Phonebook Mgr and Media Downloader many years virtually flawless on all my iDen units till I aquired this i9. I can get Media Downloader to work fine however Phonebook Mgr “cannot communicate”. “Ck connections”. Unplug, Re-Plug, Re-boot Confuser, Power-off Radio, then on, remove battery…all the tricks I know…still no communication. Ideas???…Win XP-P SP1,2. Now loading Vista Business against my better judgement in desperation 2 get this done by the upcoming kill date.. Sprint Sux!!!

    1. Chris Avatar

      Having never dealt with the i9, I’m afraid I won’t be of much use. I do have some iDEN phones that I can’t get to work with the iDEN Phonebook Manager, for those I just pop out the SIM card and put it in to a surrogate phone temporarily.

      I’m not a fan of several aspects of Sprint, but after having dealt with AT&T wireless customer service several times now, I feel a little like Winston Smith at the end of George Orwell’s 1984: “I love Sprint”.

  3. Santiago Avatar

    Chris, this is what i was looking for, thanks!!!! But i have a little problem. Everything was ok and the script telling me that were exported 130 contacts, but I couldnt see the import file “import.mdb” when you open the directory in the windows explorer. and the “export.csv” file doesn´t appear too, can you tell me how to solve this problem????

    1. Chris Avatar

      Hi Santiago,

      I’m glad you found this script, it is nice to know my effort occasionally helps people. Hopefully you did actually find it useful and were able to get your exported data. I’m playing catch-up on replying to old comments, and I apologize for not getting back to you on this. If you specified a second argument on the command line, it would use that as the file name rather than export.csv. It’s possible that your current working directory might not be the directory the script is running it. You could try running it from the command line instead. Since you were clever enough to find this blog article, I assume you were clever enough to fix the problem. Thanks for the thanks.


  4. Thiago Avatar

    Man, i can’t thank you enough! You helped me a lot! Chris, thank you very much!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.