C# - Folder Deletion Utility
 
Rating: 1 user(s) have rated this article 5.0 out of 5 stars
Posted by: jstrosch01, on 7/19/2010, in category "C#"
Views: this article has been read 127 times


Delicious Bookmark this on Delicious

Here is a small app that I wrote to help clean up empty folders. I found that moving from development environments to production environements in large web applications if not deploying required a lot of clean to remove CVS folders.  To use this app begin by specififying the starting location in the 'Beginning Folder' box:

Start Here

Next, you have a couple of options.  You can either provide a folder name or just simply remove all empty folders.  Checking the 'Just remove all empty folders' check box will gray out/disable the above two options.  This will simply search for and remove all empty folders starting with the beginning folder.  For either option you can choose to delete permanently or send to the recycle bin. To send to the recycle bin check the 'Send all to Recycle bin' check box.

If you supply a folder name you can check  the 'Remove files if present' check box and/or the 'Search Recursively for this folder' check box.  Checking the 'Remove files if present' check box will delete all files in the target folder and then delete the folder itself.  This comes in hand when deleting CVS folders.  Checking the 'Search Recursively for this folder' check box will search through all sub-folders of the beginning folder, deleting the folder if it finds it.  For this option if you don't have the 'Remove files if present' check box checked it will only delete the folder if it's empty.

You can download the project zip here.

Or download the executable directly here.

 

Share and Bookmark

LinkedIn Google Del.icio.us Digg Reddit Stumble Upon

DISCLAIMER: This information is provided "as is". The author, publishers and marketers of this information disclaim any loss or liability, either directly or indirectly as a consequence of applying the information presented herein, or in regard to the use and application of said information. No guarantee is given, either expressed or implied, in regard to the merchantability, accuracy, or acceptability of the information.


How would you rate this article?

User Feedback

Post your comment
Name:
Comment:
Insert Cancel
Questions...
Have you upgraded to Windows 7?


Archived Polls