extracting each track to its own GPX

Just in case it might interest somebody, I thought I'd describe how I exported tracks from Basecamp and got each track into its own GPX.

First, in Basecamp, I selected "My Collection" in the Library (upper left).  Then View > Swap map and Data Views.  In Data View, I clicked the "footsteps" icon at the top of the data view to bring up a table showing all tracks in "My Collection".  I clicked the Start Time column header to sort all tracks by Start Time, ascending.  I then selected one year of tracks, from earliest to latest.  Then File > Export > Export Selection.  I specified the year as the file name (e.g. 2017) and exported all 2017 tracks to "2017.gpx".  I repeated this process for each year of tracks.

Then I used the split_logbook perl script (download at https://www.gpsvisualizer.com/gpx/ ) to split each GPX file, each containing many tracks, to create many GPX files, each containing one track.  Here is a sample command-line:

C:\Strawberry\perl\bin\perl.exe .\split_logbook.pl C:\OneDrive\Documents\2023.gpx C:\OneDrive\splittracks

The script worked perfectly.  The script named each GPX file using the name of the GPX track in the file.  Because the track names in Basecamp did not have a consistent format, the same inconsistency was present in the names of the GPX files created by the script.  I fixed this using Advanced Renamer, giving each GPX file a name based on date and time of the track.  Now sorting by name sorts the tracks by the date and time of the track.  The names of the tracks inside the GPX files are still not consistent, but that doesn't matter for my purposes.

I did run into unexpected problem.  When I opened the single-track GPX files in GPXSee or GPX Editor, the tracks didn't show up on the map as I expected.  I finally found why - in Basecamp I had set the the tracks to transparent, to avoid the mess of multiple tracks we see when we select a folder/list with many tracks in Basecamp.  The Basecamp export process had preserved the track transparency in the exported GPXs, and split_logbook.pl also preserved the transparency in the single-track GPXs.  At the start of the <trk" element I found an <extensions> element with the following code:

<extensions>
<gpxx:TrackExtension>
<gpxx:DisplayColor>Transparent</gpxx:DisplayColor>
</gpxx:TrackExtension>
</extensions>

Replacing the word "Transparent" with "Red" made the track visible for me.  I'm sure other color names would work too.

I'd also like to figure out how to do batch renaming of tracks in Basecamp to get a consistent format, based on the date and time of the track, and origin and destination names.  I think I could get that using GPSBabel, at least the date/time part, but for my present purposes the above method is good enough.