Click here to Skip to main content
15,914,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Delete Server Side FOLDERS in asp.net.

for example :
flePath :" /~Tempfolder/FileFolder/"

I have one Tempfolder and inside of one filefolder .how to delete the whole Filefolder?
kindly advice thanks.
Posted
Updated 3-Sep-15 22:13pm
v2

Please read all guidelines before posting your questions. First try to google it or search. Chances are you will find your solution. Next you post , please try to search your problem on internet, for now
Follow this link for your problem.
Create and delete folder (directory) in ASP.Net using C# and VB.Net[^]
 
Share this answer
 
Use Directory.Delete

https://msdn.microsoft.com/en-us/library/fxeahc5f(v=vs.110).aspx[^]

Get the directory path using MapPath

https://msdn.microsoft.com/en-us/library/system.web.httpserverutility.mappath(v=vs.110).aspx[^]

The account your code is running under will need permissions to do this.
 
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