I have the following script that lists the files in a different directory and generates hyperlinks to them to download them. I want to be able to but a check box to the left of every file that is listed and have a delete selected files button at the bottom of the list. I know I can use the file system object to delete files, just don't know how to add the box and button to delete the files. Here is current source:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>Gungor Productions File Exchange</TITLE>
<style>
BODY {background-color: white;font-family:arial; font-size:12}
</style>
</HEAD>
<BODY>
<p align="center"><b><font size="5">Gungor Productions File Exchange Management Interface</font></b></p>
<div style="border-bottom: #A91905 2px solid;font-size:16"><br><strong>Listing of Files on server:</strong></div>
<%
Dim strPath 'Path of directory to show
Dim objFSO
Dim objFolder
Dim objItem
strPath="./files"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"
Set objFolder = objFSO.GetFolder(Server.MapPath(strPath))
response.write "<TABLE>" &_
"<tr><TD><strong>File Name</td></strong>" &_
"<TD><strong>Size</strong></TD></TR>"
For Each objItem In objFolder.Files
response.write "<tr><TD><A HREF=""" &_
strPath & objItem.Name &_
""">" & objItem.Name & "</A></TD>" &_
"<TD>" & objItem.Size & "</TD></TR>"
Next
response.write "</TABLE>"
Set objItem = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
%>
<p align="right"><font face="Verdana" size="1">©2004, Gungor Productions.
All Rights Reserved.</font></p>
</BODY>
</HTML>
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>Gungor Productions File Exchange</TITLE>
<style>
BODY {background-color: white;font-family:arial; font-size:12}
</style>
</HEAD>
<BODY>
<p align="center"><b><font size="5">Gungor Productions File Exchange Management Interface</font></b></p>
<div style="border-bottom: #A91905 2px solid;font-size:16"><br><strong>Listing of Files on server:</strong></div>
<%
Dim strPath 'Path of directory to show
Dim objFSO
Dim objFolder
Dim objItem
strPath="./files"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"
Set objFolder = objFSO.GetFolder(Server.MapPath(strPath))
response.write "<TABLE>" &_
"<tr><TD><strong>File Name</td></strong>" &_
"<TD><strong>Size</strong></TD></TR>"
For Each objItem In objFolder.Files
response.write "<tr><TD><A HREF=""" &_
strPath & objItem.Name &_
""">" & objItem.Name & "</A></TD>" &_
"<TD>" & objItem.Size & "</TD></TR>"
Next
response.write "</TABLE>"
Set objItem = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
%>
<p align="right"><font face="Verdana" size="1">©2004, Gungor Productions.
All Rights Reserved.</font></p>
</BODY>
</HTML>