1 2 3 4 |
for song in **/*.mp3 do NAME=$(echo ${song%/*} | sed -e 's|[/ ]|-|g’) ffmpeg -y -i $song -vn -c copy /path/NOART/"$NAME-"${song##*/}; done |
This works with a bash5 or zsh shell.
**/*.mp3
Every file matching .mp3 in every directory under the currentecho ${song%/*} | sed -e 's|[/ ]|-|g’
convert all slashes and spaces in the path portion (not in file name) to dashes—vn -c copy
Do not copy video (video no) and otherwise copy the file unmodified/path/NOART/"$NAME-"${song##*/}
save to the path with the filename set to the NAME variable and the base name of the $song.- Output filename will look like “10Cc-Look-Hear-Dressed To Kill.mp3”.