Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > System.IO.Directory.Delete Throws "the directory is not empty"

Reply
Thread Tools

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

 
 
codeboy
Guest
Posts: n/a
 
      06-08-2009
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

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-08-2009
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/
================================================== ===
"codeboy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
Virtual directory error: "directory does not exist or is not accessible because of security settings" Dave ASP .Net 1 10-24-2005 02:05 AM
Server cannot access application directory... The directory does not exist or is not accessible because of security settings. ASP .Net Security 1 05-21-2004 03:47 PM
Directory.CreateDirectory Method throws UnauthorizedAccessException GM ASP .Net 2 01-16-2004 10:50 PM
RewritePath throws "Access is Denied" when rewriting to directory level SJ ASP .Net Security 1 11-17-2003 03:45 AM



Advertisments