dotfiles/.config/scripts/misc/copy-music-covers.sh

12 lines
302 B
Bash
Raw Normal View History

2024-09-05 13:24:38 +08:00
#!/bin/bash
find "~/Music" -type f -iname '*cover.*' | while read file; do
destfile=$(echo "$file" | sed 's/Music/Music-transcode/')
mkdir -p "$(dirname "$destfile")"
if [ -f "$destfile" ]; then
echo "$destfile file exists"
else
cp -i "$file" "$destfile"
echo "copying to $destfile"
fi
done