I feel that stuffing the whole lot down right into a flat listing goes to trigger even additional points, to not point out the madness will probably be of iterating via tracks. Certainly your stereo has an idea of skipping a monitor, and skipping out of the present folder while you’re executed with it? Would not randomization additionally render selecting the music you need to discover primarily unimaginable?
With out data of your stereo, selecting a center floor of only one sub-directory, perhaps two, might be (hopefully) a ok resolution.
With one listing you’d most likely need folders which might be: Artist Title - Album Title
with monitor names of 1-01 - Title…
for multi disc albums and 01 - Title
for these with out. Alternatively you’ll be able to simply use the multi disc album model naming for the whole lot offered that “no disc quantity” ends in 1. (Or 0, a number one zero is okay, however a number one -
most likely is not someplace.)
That is doable however horrendously difficult to do in a script alone. There may be certainly software program on the market that can assist you handle this, I do not know what that software program is. It’s a must to (1) create the sub-directories, (2) copy the recordsdata to their new applicable location within the newly created sub-directories, and (3) rename them with the disc label in order that you don’t intermix Disc 1 and Disc 2 and Disc n tracks which might be in any other case not disambiguated.
I can get shut, and it really works for me as a result of I already title my recordsdata with Discnr-Tracknr - Title
codecs when a number of discs are current, regardless of their additionally being organized into sub-folders:
discover . -type f |awk 'BEGIN {FS="/"}{ printf "mkdir "/Flat/%s - %s"; cp "%s" "/Flat/%s - %s/"", $2, $3, $0, $2, $3; print ""}'
mkdir "/Flat/DDR - DDRMAX"; cp "./DDR/DDRMAX/Disc 1/1-01 Lovin' You (Rob Searle membership combine).m4a" "/Flat/DDR - DDRMAX/"
mkdir "/Flat/DDR - DDRMAX"; cp "./DDR/DDRMAX/Disc 1/1-02 Someplace Over the Rainbow.m4a" "/Flat/DDR - DDRMAX/"
mkdir "/Flat/DDR - DDRMAX"; cp "./DDR/DDRMAX/Disc 2/2-01 Choose.m4a" "/Flat/DDR - DDRMAX/"
mkdir "/Flat/DDR - DDRMAX"; cp "./DDR/DDRMAX/Disc 2/2-02 WWW.Blonde Lady (Momo combine).m4a" "/Flat/DDR - DDRMAX/"
mkdir "/Flat/Metallica - Load"; cp "./Metallica/Load/01 Ain't My Bitch.m4a" "/Flat/Metallica - Load/"
mkdir "/Flat/Metallica - Load"; cp "./Metallica/Load/02 2 X 4.m4a" "/Flat/Metallica - Load/"
Be aware that I took some liberties with the output like re-ordering my output to get it listed extra properly readable to show its operate.
You’d then add | sh
onto the top of this command to ensure that it to do the work operating the instructions listed right here. This output is simply printing string to confirm that the instructions you need it to execute would act as the way in which you need it to.
This resolution does imply you will get a ship load of “listing already exists” errors, however these are solely a nuisance and don’t cease the method.
Doable, sure. Sanely? Ehhhhhhhhhhhhhhhhhhhhhh. Principally will depend on your supply file naming being rigorously actual and effectively organized.