Skip to content

Instantly share code, notes, and snippets.

@avi-perl
Last active June 13, 2023 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avi-perl/f4e723a629ce396bd2e2755a6dfd67ea to your computer and use it in GitHub Desktop.
Save avi-perl/f4e723a629ce396bd2e2755a6dfd67ea to your computer and use it in GitHub Desktop.
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%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment