Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Simone Chiaretta is a Software Architect and Developer from Milano, Italy that enjoys sharing via his blog his development experiences and more than decennial knowledge on web development with ASP.NET and other web technologies. He is Microsoft MVP in ASP.NET and he has been involved in many Open Source projects, but now he focuses only on SubText and taking it to the next level. He just wrote a book: Beginning ASP.NET MVC, published by Wrox Simone is a DZone MVB and is not an employee of DZone and has posted 55 posts at DZone. You can read more from them at their website. View Full User Profile

Cleaning Up a Folder Structure From Visual Studio Artifacts From the Shell

03.18.2010
Email
Views: 2567
  • submit to reddit

A few years ago I wrote a post that showed how to write a NAnt script to clean a folder structure from the artifact’s folders used by Visual Studio.

Today what I wanted to show you is a way that doesn’t require NAnt installed on your computer, but that uses just a very simple command for Windows’ shell.

Actually, it’s just a very tiny variation of the same command that Jon Galloway wrote to clean a folder structure from SVN files.

But without further ado, here it is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN] @="Delete SVN Folders"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteBinObj]
@="Delete Visual Studio Artifact Folders"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteBinObj\command]
@="cmd.exe /c \"TITLE Removing BIN and OBJ Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (bin obj) DO RD /s /q \"%%f\" \""

To install it, all you have to do is copy the text above into a txt file, rename it to .reg and double click on it. And after that you will have two new commands that will appear in the right-click menu in Windows Explorer.

Menu

HTH

 

References
Published at DZone with permission of Simone Chiaretta, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)