shell-scripts/set-tracknumber

10 lines
233 B
Text
Raw Permalink Normal View History

2024-03-03 23:32:28 +01:00
#!/bin/sh
# 01 Song Title
nots="$(ls *.flac | wc -l)" # Number of tracks
for file in *.flac; do
not=$(echo $file | awk '{print $1}') # Number of track
track="$not/$nots" # i.e. 01/14
metaflac --set-tag=Track=$track "$file"
done