EzineArticles - Expert Authors Sharing Their Best Original Articles



  Submit Articles
  Members Login
  Benefits
  Expert Authors
  Read Endorsements
  Editorial Guidelines
  Author TOS

  Terms of Service
  Ezines / Email Alerts
  Manage Subscriptions
  EzineArticles RSS

  Blog
  Forums
  About Us
  What's New
  Contact Us
  Article Writing Shop
  Advertising
  Affiliates
  Privacy Policy
  Site Map


Advanced Search


Would you like to be notified when a new article is added to the Web-Development category?

Email Address:


Your Name:


Prefer RSS?
Subscribe to the
Web-Development
RSS Feed:

Automator Workflow to Delete All Hidden .svn Folders For OS X 10.5
Print This Article Ezine Publisher Send To Friends Add To Favorites Post A Comment Suggest Topic Report Author

Anyone who has ever used Subversion knows that it can be a chore to clean up a folder that you wish to remove from source control. For example, you want to transfer a web site over to the web server, but don't want all the hidden .svn folders to be copied as well. On the Macintosh, it's even more of a pain because Apple's attempt to make the computer easier to use, has rendered it near impossible to manage hidden files

I searched the web for an answer, and found several Automator workflows that claimed to delete all the hidden .svn folders from a given path, but none worked in OS X 10.5. Something changed. All the "rm" operations to delete files and folders returned "Operation denied" type error messages. It turns out that it was the fact that the files are locked, and the "rm" command cannot delete locked files. Simple enough. So I wrote the Automator workflow which can be installed as a Finder plugin, allowing you to right-click a folder and execute the workflow in one step. Perfect! Now, it's easy to find and remove all those hidden .svn folders. You can create one of your own using the tips below:

  1. Create a workflow.
  2. Add the finder item "Get Selected Items"
  3. Add a "Run Shell Script" item.
  4. 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:


for f in "$@"

do

find "$f" -name .svn -print0 | xargs -0 chflags -R nouchg

find "$f" -name .svn -print0 | xargs -0 rm -fr

done

You could get fancy, and add "Ask for Confirmation" to the very top of the workflow, so be prompted before executing the command. Either way, it works great. Your last step would be to "Save" the workflow as a Finder plugin, by choosing "File > Save as Plug-In". Now, log off and then back on, and right click a folder. From the contextual menu, simply choose "More" and you should see Automator actions as a menu option. Your plugin is in there.

I hope I've saved you a few pain relievers.

ABOUT MEZZOCODE, LLC

Mezzocode, formerly pocketkaos, is an information technology consulting, design and development company that helps its clients use the web to grow their businesses.

What does that mean? Well, that's different for each company.

Some companies want to use the internet to attract and acquire new customers, or to streamline their internal processes. Others want to find a better way to communicate or build brand awareness.

No matter what your goals are, Mezzocode can help you accomplish them by learning your business and needs, designing the technical architecture, and developing the final product. And we can do this entirely on our own, or seamlessly assist your existing development team.

Article Source: http://EzineArticles.com/?expert=Michael_Argentini

Other Recent EzineArticles from the Internet-and-Businesses-Online:Web-Development Category:

Most Viewed EzineArticles in the Internet-and-Businesses-Online:Web-Development Category (90 Days)

  1. How to Create a Web Page Shadow Using Photoshop Slice Tool and HTML Coding
  2. Find Out the Best Free Website Creator
  3. Make Your Own Websites - What You Should Know
  4. Choosing Java Vs .Net For Web Development
  5. How to Put Hyperlink in an Image to Create a Clickable Picture!
  6. Under Construction Website - Create an Under Construction Web Page to Protect Yourself !
  7. How Much Does a Website Cost - An Inside Look From a Web Designer
  8. Creating Web Pages With PHP, CMS, and Joomla
  9. How to Create an HTML Image Background For Your Webpage
  10. Start My Own Website - Make Millions While I Sleep
  11. Build My Own Website in 2 Easy Steps
  12. How to Write Specifications For a Website
  13. Add a Flash Event Calendar to Your Website
  14. The Best Free Website Builder Service on the Internet
  15. Understanding the Basics of Owning Your Own Website

Most Published EzineArticles in the Internet-and-Businesses-Online:Web-Development Category

  1. Make a Website Free - 5 Benefits of Building a Website For Your Online Business
  2. 4 Reasons Why Its Important to Have a Website For Your Business - Or You Will Not Make Any Money
  3. Understanding the Basics of Owning Your Own Website
  4. How to Build a Website - Know More About It
  5. Make Your Own Website the Quick and Easy Way - Without Sacrificing Quality Or Options
  6. Make Money Online - Landing Page Creation
  7. How to Design a Social Networking Website
  8. Marketing Your Website Online
  9. Web Development Estimation
  10. Top 6 Website Basics You Must Know
  11. Under Construction Website - Without an Under Construction Web Page You Are in DANGER!
  12. Photography Website Music and Why it Hurts Your Business
  13. Creating Your Website - What You Need to Do to Make it LIVE!
  14. How to Build a Small Business Website For Less Than $100
  15. Photography Website How to For the Professional Photographer

 

This article has been viewed 680 time(s).
Article Submitted On: May 04, 2008



© EzineArticles.com - All Rights Reserved Worldwide.