Gather and move nested audio files via command line

Over the years my brother has amassed a large music library of 20,000+ songs. He has a great taste for sound, but when it comes to technology his nerd DNA is dwarfed by his outdoorsman DNA. After several computer upgrades, multiple iTunes Library restorations and transfers, and no file file management whatsoever, a significant portion of his audio files were corrupt and wouldn’t play (via iTunes or in the Finder on his Mac). Music is a very important part of his life, so I set out to help him.

After tinkering for a bit I discovered that running bad files through an mp3 converter fixed the problem—the content was intact, but iTunes was having trouble reading them fully1.

Having discovered the fix for individual files, I faced another problem: those items were spread across a directory with thousands of nested folders, some several levels deep in the hierarchy. There was no way I was going to manually move 20,000 files.

nested-audio-files-1

Continue reading Gather and move nested audio files via command line


1. More specifically, iTunes recognized the presence of a corrupt file in the library, but couldn’t actually play it and would skip to the next song.