Created
November 2, 2017 03:19
-
-
Save Iv/87543c7da6de4bd72542c3ecedb786cd to your computer and use it in GitHub Desktop.
Uses perfetct lib https://github.com/twpayne/igc2kmz to convert all *.igc files in dir to *.kmz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
set targetfolder=%1 | |
cd /d %targetfolder% | |
for /f "usebackq delims=|" %%F in (`dir /s /b %targetdir%*.igc`) do ( | |
for %%a in ("%%F") do for %%b in ("%%~dpa\.") do set "pname=%%~nxb" | |
set kmz_name=%%F.kmz | |
if not exist "kmz_name" ( | |
if exist "%%~dpFcolor.txt" (set /p col=<"%%~dpFcolor.txt") else (set col="ffffffff") | |
echo "%%F" to "!kmz_name!" color "!col!" | |
c:\Python27\python.exe c:\igc\igc2kmz\bin\igc2kmz.py -i "%%F" -o "!kmz_name!" -c "!col!" -n "!pname!" | |
) | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment