The archives are named <artist> - <album>.zip
. After extracting into a folder with the same name, less the extension, I want to remove the artist name. Also, if " - " appears in the album title I only want to remove the first instance after the artist name:
Rename the folders: ls -d */ | awk -F'#' '{orig = $0; sub(/ - /, "#"); system("mv \"" orig "\" \"" $2 "\"")}'
The sound files are named <artist> - <album> - <track number> <track name>
. I like to the tracks to follow the format <track number> - <track name>
:
Rename the files: ls | grep flac | awk '{idx = match($0, " - [0-9][0-9]"); title = substr($0, idx + 3); sub(/ /, " - ", title); system("mv \"" $0 "\" \"" title "\"")}'