Hi

I have the following script that removes a record from a database.  This
database record contains document information i.e. docid, docname,
docpath etc.   

<CFQUERY DATASOURCE="#Application.DSN#">
SELECT * FROM documnents
WHERE docid = <CFQUERYPARAM CFSQLTYPE="CF_SQL_INTEGER" Value="#docid#"
maxlength="4">
</CFQUERY>

However how can I modify the above so it actually removes the document
from the filesystem?  At present it only removes the record from the
database, and the file is still left on the file server.

I have tried the following

<cffile action="delete"
        file="F:\downloads\#docpath#">

But I am getting the error

-----------
Variable DOCPATH is undefined.  
 
34 : 
35 : <cffile action="delete"
36 :    file="F:\downloads\#docpath#">



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326619
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to