Gist Blog

Convert Google Voice Takeout files into a spreadsheet

Google Takeout to CSV

I was asked by someone for help with the following: They had used Google Takeout to download voicemails from Google Voice and they now wanted some metadata about the voicemails in a CSV.

The following script will accomplish this task on windows without any need for installing a program or scriping language and can be use by somebody without a technical background.

Setup Instructions

  1. Save the following file to your computer making sure that the file extension ends with .bat.

    Here are instructions on how to do that

  2. Move the file to the same folder as the mp3 files that you have downloaded from Google.

  3. Double click the file to run the script. (If this opens the file in notepad, see link on step 1.)

  4. Locate the new file created called output.csv

@echo off
setlocal enabledelayedexpansion

set OUTPUT_FILE=output.csv
echo Name,Time > %OUTPUT_FILE%

for %%F in (*.mp3) do (
    set "filename=%%~nF"
    for /F "tokens=1,2,* delims=-" %%A in ("!filename!") do (
        set "name=%%A"
        set "time=%%C"

        if not "!name:~0,1!"=="+" (
            echo !name!,!time!,!other_parts! >> %OUTPUT_FILE%
        )
    )
)

echo Extraction complete! Output file: %OUTPUT_FILE%

Comments

To make a comment, please visit this posts Gist.

Add your comment!