Last active
June 2, 2022 02:24
-
-
Save pfeilbr/68eb0fc0da423f026a08fdd7a3d9e3c9 to your computer and use it in GitHub Desktop.
dropbox delete folders containing the string conflicted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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