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]|
|; any # from 1 to 16|
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.
Common format settings.
Any option from any of the formats listed here will be used by GPSBabel unless explictly provided on the command line.
Common filter settings.
As above, but for filters.
This allows you to give readable names to the numeric categories used internally in some Garmin devices and the Mapsource formats such as GDB and MPS. This is information is also used by our GPX and garmin_txt formats as well.
By default, GPSBabel tries at startup to load the file named
gpsbabel.ini from the following locations:
current working directory
Windows: all paths "APPDATA", "WINDIR", "SYSTEMROOT" declared in environment.
Unix like OS'ses:
-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 useable (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 -