I am unfortunately writing a simple dialog application that runs on a Vista machine. My dialog has a user control that accepts a string input and builds a directory structure based upon the user text. For the first two weeks all was well. It created the directory tree and put files where they were suppose to go but this week something has changed and while it still creates the directory structure correctly, it will not let me ( or anyone else ) delete the tree when finished with it. The error message explains that the file is no longer where I said it was which I suspect is really a response to the folders all having the read-only bit set. Of course I can not remove the read-only flag for the same reason that I can not delete the file ( file is no longer where I said it was). I am thinking that I need to explicitly set the security in the SECURITY_ATTRIBUTES structure. Can anyone point me to a good example of how to implement this? Errrgg!!!
The folders all show up in the GUI view and also in a cmd prompt. The attributes show read-only but I can not remove it either using the properties dialog or with attrib -R.