Skip to content

Instantly share code, notes, and snippets.

@josy1024
Created January 3, 2016 16:43
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 josy1024/24ed79a6542b07f83bdc to your computer and use it in GitHub Desktop.
Save josy1024/24ed79a6542b07f83bdc to your computer and use it in GitHub Desktop.
convert tcx to gpx tracks
#author: josef lahmer
# 3.1.2016
#
# PowerShell.exe -ExecutionPolicy Bypass -File .tcx2gpx.ps1
#
# tcx = garmin training center tcx
# gpx = gpx xml
# depencies
# powershell, gpsbabel from http://www.gpsbabel.org/
# used for https://github.com/mcconkiee/gpx-googlefit
param(
[string]$source="C:\tmp\2015",
[string]$gpsbabel = "C:\Program Files (x86)\GPSBabel\gpsbabel.exe"
)
get-childitem $source -include *.tcx -recurse | foreach ($_) {
Write-Host $_.fullname
$Command = $gpsbabel
$Parms = "-w -t -i gtrnctr -f $_ -o gpx -F $_.gpx"
$Prms = $Parms.Split(" ")
Write-Host "$Command" $Prms
& "$Command" $Prms
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment