Navigating a Folder and Its Subfolders

A colleague recently discovered how to navigate a folder using recursion (in C#). He took me back in time when I wrote a function that would delete any given folder. The application was coded as a simple console program in C++. You basically entered what folder you wanted to delete and it would delete it. The program was just a proof of concept... sort of a demo for someone who needed to know how to navigate the folder in C++. In this case the objective was to show how to delete a folder and it's subfolders.

The funny thing is someone deleted most of their C:\ drive when they entered "C:\\" at the prompt that read "Enter the dir path...".

Here is a link to the full post. Notice the last two entries by t_rex and *ClownPimp.

http://cboard.cprogramming.com/cplusplus-programming/40209-deleting-folders-sub-folders.html


I see why people distribute licenses and disclaimers with any of their software.

I am glad it was not a PHD candidate's hard drive.

Comments

Popular posts from this blog

Putting Files on the Rackspace File Cloud

Setting Up XnaMobileUnit to run unit tests in Windows Phone 7 XNA Games

Reasons to Stay Away from CSLA