Working with predefined options

GPSBabel can read a file on startup to set defaults for options. All module and filter options may be set this way.

The format of the file is identical to the inifile-format often seen on Windows. Here is an example:

[Common format settings]
snupper=Y
snlen=10
[gpx]
gpxver=1.1
[magellan]
baud=115200
[tiger]
[Garmin categories]
; any # from 1 to 16
1=fixed waypoints
2=temporary waypoints

Each section of the file starts with a '[section]' header followed by any number of lines formatted option=value. Leading and trailing whitespace will be automatically removed from header, option and value items. Lines starting with '#' or ';' will be treated as comments and ignored.

There are three optional sections.

By default, GPSBabel tries at startup to load the file named gpsbabel.ini from the following locations:

If the -p option is specified, the above locations are not searched. Only the filename specified by that option will be used.

There may be situations where predefined values are not usable (i.e. wrapper applications using GPSBabel in the background). The inifile mechanism can be disabled with an empty filename.

gpsbabel -p "" -i gpx -f something.gpx -o tiger -F -