If you are using ASP Classic to delete a file from server you can use the following script:
<%
Dim filepath, strPhysicalPath
filepath = Session("filetodelete")
strPhysicalPath = Server.MapPath("directoryvirtualpath" & filepath)
set oFile = CreateObject("Scripting.FileSystemObject")
oFile.DeleteFile (strPhysicalPath), True
set oFile = nothing
%>
but if you are using ASP.Net You will need the Following Code:
Dim oDir As New DirectoryInfo(path)
Dim oFile As FileInfo
For Each oFile In oDir.GetFiles(SearchPattern)
oFile.Delete()
Next
Create Forms in Symfony2 the easy way
11 years ago
No comments:
Post a Comment