I have a large set of downloaded GPX files in a folder and each of which contain a single route. The GPX filenames can of course be easily edited. Using JaVaWa RTK one can see the assigned names of each route extracted from the <name> field inside the file. I want to change the contents of the <name> field to match the GPX filename so they are the same.
At present I either have to import each route into Basecamp, cut and paste the filename into the properties box, then export the route to create a new GPX file with the same name (or of course use a text editor).
Does anyone know of a utility that has the functionality to overwrite the contents of the first <name> field with the filename either singly or preferably as a batch?
Bulk renaming of GPX routes to match filename
- GPSrChive
- Site Admin
- Posts: 3937
- Joined: Fri Jan 20, 2017 11:29 pm
Re: Bulk renaming of GPX routes to match filename
We use Notepad++ to do large batch editing of text files, which is all any GPX file is. But practice first on a copy of a file to be sure you have everything configured correctly before applying to a large number of files. We have had some extra fun before going back and correcting mistakes!
-
- Posts: 65
- Joined: Thu Apr 04, 2019 9:35 am
Re: Bulk renaming of GPX routes to match filename
Thanks gpsrchive - I too use Notepad++ to edit individual text files. Good advice about backups !!
Did you use Notepad++ by running a macro to process a batch of files or did you use a Command line?
Did you use Notepad++ by running a macro to process a batch of files or did you use a Command line?
- GPSrChive
- Site Admin
- Posts: 3937
- Joined: Fri Jan 20, 2017 11:29 pm
Re: Bulk renaming of GPX routes to match filename
Notepad++ is very powerful.
We open multiple files, and then search globally for specific text strings and replace them all.
May not be possible to copy the actual file name into the <name> tag now that I think about it.... At least not without a batch file.
How many GPX files are you renaming?
We open multiple files, and then search globally for specific text strings and replace them all.
May not be possible to copy the actual file name into the <name> tag now that I think about it.... At least not without a batch file.
How many GPX files are you renaming?
-
- Posts: 65
- Joined: Thu Apr 04, 2019 9:35 am
Re: Bulk renaming of GPX routes to match filename
They come in batches of 30 to 40 files and there could be quite a lot of batches in future to edit.
The GPX route names are sometimes but not always the same, so a global find and replace approach may not work?
The GPX route names are sometimes but not always the same, so a global find and replace approach may not work?