Delete files in C# that windows does not want me to delete?

Posted by user315881 on Stack Overflow See other posts from Stack Overflow or by user315881
Published on 2010-04-13T20:32:00Z Indexed on 2010/04/13 20:32 UTC
Read the original article Hit count: 147

Filed under:
|
|

At my company, we are writing a script to take care of simple tasks that we usually would do by hand. I am using c# to delete profiles in c:\documents and settings\, except a few. These will simply be left alone. The problem is that even with code that sets the files to normal and marks the admin user as an owner, they won't delete. They say that the quick launch folder has access denied. I am using a recursive permissions change method and I know that it works. Same thing with file attributes. Why won't it work? How do I fix this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about delete