Hey guys, i've been trying to figure this out for the last few days, and am still having some troubles.
When i hit the delete button, it removes the file, but prompts me with an error.
Any suggestions?
here is some of the code
________________
<CFSET SendFileTo = "C:/inetpub/wwwroot/test.com/">
<CFPARAM NAME="Action" DEFAULT="">
''
<CFIF Action IS "">
<!---Get all the files in the current directory--->
<cfdirectory directory="#SendFileTo#" name="dirQuery" action="LIST" FILTER="*.pdf" sort="Name, Type">
''
<!---If the "Delete" link has been clicked, then remove the file that was passed in the URL string--->
<CFIF Action IS "Delete">
<cffile action = "delete"
file = "#SendFileTo##FileName#">
<P style="color: red;"><b>File has been successfully removed on the server.</P><b/>
''
<cfoutput query="dirQuery">
<CFIF name IS NOT "upload.cfm">
<tr>
<td><a href="#cgi.SCRIPT_NAME#?action=delete&fileName=#name#">[ Delete ]</a></td>
<td><A href="http://www.test.com/#name#">[ View/Download ]</a></td>
<td>#name#</td>
</tr>


