Auto-Import Configuration
The Auto-Import feature can import all GPS files from a particular location on program startup, or when the "File/Auto Import" menu or the
toolbar icon are selected. AutoImport behavior is configured in the Auto Import section of the configuration dialog.

Options
- Mode - Controls the overall behavior of the Auto-Import feature, from one of these options:
- Disabled - The feature is disabled.
- Menu - The feature will run only on-demand, when the "File/Auto Import" menu or the
toolbar icon are used
- Startup - The feature will run at program startup.
- Directory - This is the location from which files will be Auto-Imported. The folder icon to the left of the text area will present a file browser to select a location. If this does not point to an existing directory, the text will be displayed in the UI error color.
- Pattern - This is a space-separated list of shell glob-style patterns. Only files matching one of the patterns will be imported. Note that this is not a regular expression. An empty string matches no files.
- Tags - Zero or more tags can be applied to Auto-Imported tracks. The tag button to the left of the displayed tags can be used to select the set to be applied.
- Post-Import - Determines how to handle files after they have been Auto-Imported, from one of:
- Backup - Files will be renamed to their old name plus the Backup Suffix.
- Move - Files will be moved to the Backup Directory and retain the current name.
- Delete - Files will be deleted.
- Leave - Files will be left in place.
- Backup Suffix - Suffix for use with the Backup mode.
- Backup Directory - Directory for use with the Move mode. If this does not point to an existing directory, the text will be displayed in the UI error color.
- External Command - This option is a command to execute before running the import process. Please see the External Commands section below for more information.
- Use Stdout - If checked, the stdout from the command will be read as if it was a GPS file, in addition to any other files matched by the Pattern option above.
- Timeout - If the external command has not completed in this amount of time, it will be killed.
External Commands
Some devices may have a custom tool which can non-interactively extract data from the device. A command can be automatically run before ZTGPS attempts to complete the import step. It is the job of this command to provide data, either in a directory, or on its standard output.
The external command is not run in a shell, but certain POSIX-shell type features are available in the string provided to ZTGPS, such as variable substitution, tilde (~) expansion, wildcard globbing, quoting, and process substitution.
The external command is run asynchronously. The tracks may not appear for several moments after using the Auto Import feature if the external process does not complete immediately. If the external tool does not finish within the Timeout value, ZTGPS will kill the process.
The stdout checkbox will cause ZTGPS to read the standard output of the command as if it was a GPS file in one of the supported formats. Other files present in the AutoConfig directory will still be read as normal, but a pattern which does not match any files can be used to prevent this behavior if needed.
Note that files matching the Pattern will be imported whether or not they were produced by the external command. if the command writes to stdout, the pattern can be set to an empty string to prevent accidentally reading files.