Skip to content

Instantly share code, notes, and snippets.

@zaydek-old
Last active September 10, 2016 00:37
Show Gist options
  • Save zaydek-old/adde9ed61f26c3ea31a23a8bfcee053e to your computer and use it in GitHub Desktop.
Save zaydek-old/adde9ed61f26c3ea31a23a8bfcee053e to your computer and use it in GitHub Desktop.
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