Get my music back

Already happens to you?

I had an SD card in my old car with music that I had chosen from my personal collection on my NAS. I bought a new car but it didn’t have an SD card reader, only have USB ports. Furthermore, some files on the SD card were corrupt and I’m getting read errors, so it was not possible to copy the files from the SD card to a PEN Drive. In addition to this, the folder structure on the SD card was different from that on the NAS and it did not have the image files for the album covers. The only solution would be to re-copy and organize all files from the NAS collection. This had already happened when the SD card get corrupted. So, I rolled up my sleeves and I create this script that collects the list of files on the SD card, searches the NAS for the same songs and copies the songs from the NAS to the same folder structure on a destination, for example a PEN Drive. Additionally, the script creates a json with list of source files, you can use the script to rebuild your music collection after formatting a corrupted SD card or PEN Drive.