3

Currently I am using GPSBabel to convert geocaching.com loc files to gpx files, since my navigation device does not support loc.

I have a lot of loc files to convert and I would like to know how I can convert all loc files in 1 folder with a few clicks, since doing it one by one costs a lot of time.

Shortly, I want a bulk loc to gpx converter

Moreover, it would be extra nice if their would be a way to let the filename match the name tag in the loc/gpx file?

If you need extra information to answer my question, please ask

  • The GPSBabel GUI should let you select multiple input files at once. It will output all of them to the same file. Depends on whether your device needs separate GPX files or not? – vclaw Aug 11 '16 at 0:55
  • @AndreJ Thanks for your answer to my question. However, when running the bat file(solution 2) I get the error: 'gpsbabel' is not recognised as a internal or external command, operable program or batch file. What am I doing wrong – ccvl Aug 11 '16 at 10:10
  • @vclaw I need seperate files – ccvl Aug 11 '16 at 10:10
  • @AndreJ My code is as following : FOR %%i IN (*.loc) DO C:\Program Files (x86)\GPSBabel\gpsbabel -t -w -i loc -f %%i -o gpx -F %%~Ni_loc.gpx I did run this in the folder in which the loc files are located – ccvl Aug 12 '16 at 8:34
  • The path to gpsbabel contains blanks, so you have to put the command in double quotes. – AndreJ Aug 12 '16 at 9:41
1

I suggest to try using GPSbabel from the command line http://www.gpsbabel.org/htmldoc-1.5.3/batchfile.html . Another choice would be looping through a folder with a batch file, see Batch converting Garmin GDB to GPX?

You might need to add the path to gpsbabel.exe if it is not already in the PATH variable. Most likely "C:\Program Files (x86)\GPSBabel\gpsbabel" in double quotes to escape the blank in the path. Or move the bat file into that folder if you have set full path to the files.

The batch file could look like

FOR %%i IN (*.loc) DO "C:\Program Files (x86)\GPSBabel\gpsbabel" -t -w -i geo -f %%i -o gpx -F %%~Ni_loc.gpx
  • Thanks a lot @AndreJ. Your help made it succesful. I had to add the double quotes and change the input format. – ccvl Aug 13 '16 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.