I want to use GPSbabel to merge all single .gpx
files within one folder into one file called for example merge.gpx
how can i archive something like this?
I know how to do it manually:
gpsbabel -i gpx -f "folder/of/file/1.gpx" -f "folder/of/file/2.gpx" -f "folder/of/file/3.gpx" -o gpx -F "folder/of/file/merge.gpx"
But because there are up to 20 such files within one folder i would like to use a batch (.bat) file to do this automatically? I'm nearly completely new to batch files and could not find any information how to archive that.
For Linux, you could use the following bash script:
#!/bin/bash
cd /folder/of/file
ff=""
for f in *.gpx
do
ff="$ff -f $f"
done
gpsbabel -i gpx $ff -o gpx -F "All.gpx"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With