Skip to content

Instantly share code, notes, and snippets.

@envygeeks
Last active June 8, 2019 03:01
Show Gist options
  • Save envygeeks/8876bd7c0d839c3eab1a6aabfbb6a00d to your computer and use it in GitHub Desktop.
Save envygeeks/8876bd7c0d839c3eab1a6aabfbb6a00d to your computer and use it in GitHub Desktop.
on idle
tell application "Finder"
do shell script "find ~ -name .DS_Store -mindepth 2 -delete"
set volumesToClean to {"Backups", "Movies"}
repeat with volume in volumesToClean
if (exists disk volume) then
set volPath to "/Volumes/" & volume
do shell script "find " & quoted form of volPath & " -name .DS_Store -delete"
do shell script "dot_clean " & quoted form of volPath
end if
end repeat
end tell
return 3600
end idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment