You are here

Add new comment

yPhil's picture

Hi, here is my latest version ; Master Capela, can you confirm that it will effectively delete any leftover file?
Note: It is designed to work with both zsh and (ba)sh

function px-qtractor-takes-cleanup () {
    [[ "${2:-}" == "--delete" ]] && COMMAND="rm -fv" || COMMAND="ls"
    echo "Usage: $0 qtr_session_file [--delete)]"
    for file in *.wav* *.mid* ; do
        grep -q -F "$file" $1 || eval $COMMAND " $file"
    done
}