Re: [Gpsbabel-misc] GPSBabel Batch File, gpx to kml - help requested
GPSBabel converts and transfers data like waypoints, tracks & routes.
Brought to you by:
robertl
|
From: lymdis <ly...@ya...> - 2017-09-11 06:36:24
|
Hi Gary, This works perfectly! - I agree that it seems more intuitive to have the .bat file in the same folder as the .gpx's, so this is ideal. Thanks very much for taking the time to reply and help - I appreciate it. On 10/09/2017 23:33, Gary Turner wrote: > To me, the best way to run batch files (particularly when diagnosing > problems) is to run a command window first, then type in the batch > file name. > That way, if there are errors, you might see them, rather than having > them swallowed by the closing window, even though your 'pause' should > have prevented the closing, and allowed you to see any error messages. > > If you navigate to the Gpsbabel folder, you can shift-right-click and > there should be a 'command window here' box. > > Personally, I would do it the other way around, and put the test.bat > file in that temp folder, and then do something like > > FOR %%f in (*.gpx) DO "C:\Program Files (x86)\GPSBabel\gpsbabel" -i > gpx -f "%%f" -o kml -F "%%~nf.kml" > > That keeps the batch file in the same place as the other files related > to your project, which I think is logically a bit clearer. I just > tried it, and that worked for me. > > On 11/09/2017 05:39, mungroe via Gpsbabel-misc wrote: >> Hi, confused new user here, >> I am trying to convert a folder containing many .gpx files to the >> equivalent >> .kml files. I followed the instructions at >> https://www.gpsbabel.org/os/Windows_batch.html. modified as per the >> post on >> this forum at >> http://gpsbabel.2324879.n4.nabble.com/GPX-gt-KML-batch-failure-td6285.html, >> >> and ended up with a batch file as follows: >> >> FOR %%f in (C:\Users\User\Desktop\temp\*.gpx) DO ( >> gpsbabel -i gpx -f "%%f" -o kml -F >> "C:\Users\User\Desktop\temp\%%~nf.kml" >> ) >> PAUSE >> >> I created this in Notepad on a Win8.1 system, saved it as "test.bat", >> then >> copied "test.bat" into my GPSBabel folder in C:\Program Files >> (x86)\GPSBabel. >> >> I tried running it by double-clicking it, which opens a command prompt >> window but nothing happens. I also tried running it as administrator, >> with >> the same result. >> >> Clearly I am making an error, either in syntax or in execution (or >> both), >> but I have no idea what I am doing wrong. Googling has not helped. >> Please >> could some kind soul help my out of the fog of frustration and >> ignorance? >> Thanks. >> >> >> >> -- >> Sent from: >> http://gpsbabel.2324879.n4.nabble.com/GPSBabel-General-f3.html >> >> ------------------------------------------------------------------------------ >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gpsbabel-misc mailing list http://www.gpsbabel.org >> Gps...@li... >> To unsubscribe, change list options, or see archives, visit: >> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc >> > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Gpsbabel-misc mailing list http://www.gpsbabel.org > Gps...@li... > To unsubscribe, change list options, or see archives, visit: > https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc . |