Something along these lines should do it, assuming you've give the ASP.NET
user account permissions to delete files in the specified directory. (The
default ASP.NET user account is named ASPNET)
Imports System.IO
'Get the directory
Dim diDirectory as DirectoryInfo = new DirectoryInfo(m_Path)
' Get a list of all the files in the directory
Dim FileArray as FileInfo()= diDirectory.GetFiles("*.*");
' Foreach file found in directory
for each myFile as FileInfo in FileArray
myFile.Delete
Next
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:u4**************@TK2MSFTNGP12.phx.gbl...
Hi
How can I delete all files within a particular folder, in asp.net (vb)?
Thanks
Regards