Skip to content

Instantly share code, notes, and snippets.

@pfeilbr
Last active June 2, 2022 02:24
Show Gist options
  • Save pfeilbr/68eb0fc0da423f026a08fdd7a3d9e3c9 to your computer and use it in GitHub Desktop.
Save pfeilbr/68eb0fc0da423f026a08fdd7a3d9e3c9 to your computer and use it in GitHub Desktop.
dropbox delete folders containing the string conflicted
# delete all folders containing the string "conflict"
while true
do
dbxcli ls -l /mac01/Users/brianpfeil/projects/ > paths.txt
while read p; do
if echo $p | grep -iqF conflict; then
full_path=$(echo "/${p#*/}")
echo $full_path
dbxcli rm --force "$full_path"
fi
done <paths.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment