I have a dummy MP3 player in my car. It always plays files in the filesystem order. I had made a plenty of such kind of utility, but everytime i change a PC i forget to move this utility to new one. This time i decided to push it here. Maybe someone appreciate it.
This time i did it with Python. This is my 1st python script, so go easy on me :)
Just put cpsort file somewhere and make it executable.
The script is pretty simple.
$ cpsort cpsort - source directory - destination directory
If i want to place ~/Music/SomeGreatStuff to /media/andrey/Transcend folder, i'd simply run $ cpsort ~/Music/SomeGreatStuff /media/andrey/Transcend
The script walks through the source directory recursively (skips symlinks) and builds the list of files to copy, then sorts the list alphabetically and copies the files using shutil.copy2()
I used Python 2.7.13