Advertisement
priore

Automator Workflow to Delete All Hidden .svn folders

Sep 11th, 2012
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # 1. From Automator (use spotlight if dont'have in Application/Utility) create a new workflow.
  2. # 2. Add "Ask for Confirmation", so be prompted before executing the command.
  3. # 3. Add the finder item "Get Selected Items"
  4. # 4. Add a "Run Shell Script" item.
  5. # 5. In the Shell Script item, choose to pass input "as arguments", choose a Shell of "/bin/bash", and use the script below as the command text:
  6.  
  7.     for f in "$@"
  8.     do
  9.     find "$f" -name .svn -print0 | xargs -0 chflags -R nouchg
  10.     find "$f" -name .svn -print0 | xargs -0 rm -fr
  11.     done
  12.  
  13. # 6. "Save" the workflow as a Finder plugin, by choosing "File > Save as Plug-In".
  14. # 7. Log off and then back on.
  15. # 8. Right click a folder, from the contextual menu, simply choose "More" and you should see Automator actions as a menu option.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement