5

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

5
  • 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? Commented Aug 11, 2016 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 Commented Aug 11, 2016 at 10:10
  • @vclaw I need seperate files Commented Aug 11, 2016 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 Commented Aug 12, 2016 at 8:34
  • The path to gpsbabel contains blanks, so you have to put the command in double quotes. Commented Aug 12, 2016 at 9:41

1 Answer 1

3

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 
1
  • Thanks a lot @AndreJ. Your help made it succesful. I had to add the double quotes and change the input format. Commented Aug 13, 2016 at 12:03

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.