Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,

I am going to create an application like winrar, I am able to create a rar file , but when the rar file is created I want to delete the folder. When i try to delete the folder getting Access denied exception. Anyone one please help me to sort out this exception.
Posted
Comments
Tejas Vaishnav 21-Sep-12 9:01am    
can you please provide error message.
means we just want to know if that directory is in use and it will throw error or you have no rights to access that directory.
Tejas Vaishnav 21-Sep-12 9:03am    
I think if you have no-rights for delete that folder then you can not delete that folder. you need to first grant full access to user over that folder.

delete the folder getting Access denied exception.
Access denied exception means proper security privileges are not in place. The account through which your application is trying to delete that link does not have security access to delete. You need to provide the same in order to do it.
 
Share this answer
 
try following methods,

1.inside the USING tag create your file/close the stream after file creating
2.Run VWD as administrator
 
Share this answer
 
you have to use the Dispose(); otherwise you wont be able to access the file to delete it
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900