function clean-music for mood in $(find ~/Músicas -name "*.mood") set path (dirname "$mood") set file (basename (string split -m1 -r '.' "$mood") | cut -c2-) if test -z (find "$path" -name "$(bash -c "printf \"%q\" \"$file\"").*" -print -quit) rm -v "$mood" end end find ~/Músicas -type d -empty -print -delete end