#!/usr/bin/env fish set whitelist inbox pics docs music movies set blacklist Desktop Downloads/Telegram\ Desktop Downloads Documents set inbox inbox # make sure whitelisted items exist set_color green for folder in $whitelist test ! -d ~/"$folder" and mkdir -p ~/"$folder" and echo " * created ~/$folder" or echo " * skipping ~/$folder" # echo "===" end # move blacklisted items into inbox, delete folders set_color red for folder in $blacklist test -d ~/"$folder" and cp -r ~/"$folder"/. ~/"$inbox" and rm -r ~/"$folder" and echo " * removed ~/$folder" or echo " * skipping ~/$folder" #echo "===" end