Last active
September 10, 2016 00:37
-
-
Save zaydek-old/adde9ed61f26c3ea31a23a8bfcee053e to your computer and use it in GitHub Desktop.
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
osascript <<! | |
set vols to {¬ | |
"/Volumes/SSD/", ¬ | |
"/Volumes/SSD2/"} | |
on DS_Store(vols) | |
repeat with vol in vols | |
set {cont, dest} to {true, ""} | |
repeat while cont is true | |
try | |
do shell script "ls " & vol & dest | |
do shell script " rm -rf " & vol & dest & ".DS_Store" | |
set dest to dest & "*/" | |
on error | |
set cont to false | |
end try | |
end repeat | |
end repeat | |
do shell script "killall Finder" | |
repeat while cont is false | |
try | |
activate application "Finder" | |
set cont to true | |
end try | |
end repeat | |
end DS_Store | |
DS_Store(vols) | |
! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment