That code doesn't prevent the folder from being added to or files from being removed/deleted from, it only prevents the folder from being deleted.

With that code, you can solve the collection various ways, like using a simple array instead. However, caching the various file handles to the registry may be a bit challenging for you. Not really sure on the need for the registry either, in this case, other than starting/quitting/re-starting the application during the same windows session.