I have a page that shows a list of files. I would like to select one of the files then direct me to another page so I can delete that single file
here is my code for the list of files
Dim folder
Set folder = fso.GetFolder(Server.MapPath("/web/file1/file2/"))
If folder.Size > 0 Then
Response.Write "<ul>"
For Each file In folder.Files
Response.Write "<a href=""/web/file1/file2/"
Response.Write file.Name & """>"
Response.Write "<b>" & file.Name
Response.Write "(Date: "& file.DateCreated & ") "
Next
Response.Write "</ul>"
Else
Response.Write "<ul><li type=""circle"">No Files Uploaded.</ul>"
End If
%>
then on the other page this is the code I'm looking at for deleting the file
<%
dim fs
Set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile("c:\test.txt",True)
if fs.FileExists("c:\test.txt") then
fs.DeleteFile("c:\test.txt")
end if
set fs=nothing
%>
any help would be appreciated
here is my code for the list of files
Dim folder
Set folder = fso.GetFolder(Server.MapPath("/web/file1/file2/"))
If folder.Size > 0 Then
Response.Write "<ul>"
For Each file In folder.Files
Response.Write "<a href=""/web/file1/file2/"
Response.Write file.Name & """>"
Response.Write "<b>" & file.Name
Response.Write "(Date: "& file.DateCreated & ") "
Next
Response.Write "</ul>"
Else
Response.Write "<ul><li type=""circle"">No Files Uploaded.</ul>"
End If
%>
then on the other page this is the code I'm looking at for deleting the file
<%
dim fs
Set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile("c:\test.txt",True)
if fs.FileExists("c:\test.txt") then
fs.DeleteFile("c:\test.txt")
end if
set fs=nothing
%>
any help would be appreciated