That sounds pretty kludgy to require a script to copy files in an exact particular order for it to work. Not everyone has access to linux or knows how to write a script to do that. The hardware should just work as specified.
For Mode #1, (files in the root directory) it’s the order in which the files were created. A pretty useless mode if you ask me.
For Mode #2, if you put the files in /01…/09 directories, the DFPlayer will use the track file name numbers (i.e. 001.mp3) to play a specific track, and then no extra function/procedure is necessary to play a specific numbered track.
For Mode #3, the mode I’m using, with all the files in an /mp3 directory has its own quirk. It ALSO does not play the tracks by track number (i.e. 0001.m3)… it indexes them in filename order… the actual file name is irrelevant, it’s the sort order that counts… if you have files:
You need to request Track 3 to play 0004.mp3 and request Track 4 to play 0009.mp3
So the 0001…000x naming scheme is just to sort the files in ascending order, but the file names are not used for playback— it’s their physical sorted order.
I would suspect if you used Mode 2 and moved your files into a /01 folder and used the native playFolder(dir, track) function, you wouldn’t need the PlayTrack function. I have yet to have a track not play or the player hang. Also, in many sketches that have serial devices sending data via interrupts (GPS, accelerometers, etc), you can’t have any delay() functions because that will cause data to be lost.