diff options
Diffstat (limited to 'bin/metamv')
-rwxr-xr-x | bin/metamv | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/metamv b/bin/metamv new file mode 100755 index 0000000..3a2d8ba --- /dev/null +++ b/bin/metamv @@ -0,0 +1,8 @@ +#!/bin/sh +# usage: metamv FILE ... +# e.g: metamv *.flac +for file; do + num="$(exiftool -m -p '$tracknumber$track' -- "$file")" + [ "$num" -lt 10 ] && num=0"$num" + mv -- "$file" "$num-$(exiftool -p '$artist-$title.$filetypeextension' -- "$file")" +done |