System.IO.Directory.Delete Throws "the directory is not empty"

C

codeboy

I am using VS2008 to create a website. When I try to programmatically delete
a directory that is located within my website I will get an error. I am
trying to delete the directory using "System.IO.Directory.Delete(strDirPath,
true)". This is the message the error gives "the directory is not empty". I
found another entry titled "Directory.Delete of a non empty dir fails in
ASP.NET application". In that posting Walter Wang says: "the folder is
locked by Visual Studio 2005 IDE if the folder is already shown in project
explorer". Now that I am using VS2008 has this been changed? How can I test
my code? Please help me get past this problem.

Thanks
 
J

Juan T. Llibre

Please do not post the same question with two different subjects.
Doing this doesn't help you and is confusing.

Thank you for your cooperation.

I already gave you an answer as a reply to your first post.



Juan T. Llibre, asp.net MVP
¿ Estas probando VS 2010 y ASP.NET 4.0 ?
Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español
http://asp.net.do/foros/forums/
=====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top