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("*.*");
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.