Snow Leopard – Automator – Remove .svn and .DS_Store
by justin on Jul.12, 2010, under Apple, Programming
Here are the shell scripts for removing .svn and .DS_Store when using an Automator Service script. Just make sure to set the service receive selected to pass files/folders and to do so “As Arguments”.
.svn
do
find "$f" -name .svn -print0 | xargs -0 chflags -R nouchg
find "$f" -name .svn -print0 | xargs -0 rm -fr
done
.DS_Store
do
find "$f" -name .DS_Store -print0 | xargs -0 rm -fr
done
Now once you save the scripts, you will have a right click contextual item in Finder for folders/files to be able to remove .svn folders and .DS_Store files. I suggest these two scripts be two separate automator workflows and not combined.