Removing .SVN folders in OS X with Automator
Posted on Monday, April 07, 2008 @ 13:54 CET
Occasionally I come across some excellent ActionScript libraries that I download to play with (for example Papervision and Degrafa) from their respective Subversion directories. If they seem useful (like the mentioned examples which are both super sweet in their own right) I add them to our Subversion repository, but before I do that I need to remove all the .svn folders which are present in each and every folder.
Not a fan of doing this by hand I looked for a way of automating it. Now if you're comfortable in the Terminal, all you need to do is navigate to the top directory and run the following command which will remove all .svn folders recursively:
find . -type d -name ".svn" -exec rm -rf \{\} \;
Now if the Terminal is not your thing, or you want a way to integrate this with the Finder then the Automator is your friend. Simply fire up Automator and choose a Custom workflow. Then make a workflow that looks like so:
Then save it as a plugin for the Finder (File > Save as Plugin) and give it a name. Now all you have to do is right-click on the folder containing the nested .svn folers and select More > Automator > Remove .SVN Folders.
If you don't want to make it yourself, you can download the workflow here. Unzip it and within your home directory, move it to Library > Workflows > Applications > Finder. You might have to logout and login (or relaunch the Finder) for it to appear.
- paulo





Post a comment:
You must have Flash and JavaScript enabled to post a comment.