How To The Write `<cffile action=”delete”>` Function In ColdFusion?
Description:-
Deletes a file from its location on the server.
<cffile
action = "delete"
file = "full pathname"
>
Attributes:-
action
:- This is a required attribute, the type of file manipulation the tag performs.
file:-
This is a required attribute, the Pathname of the file to delete. If it is not an absolute path (starting with a drive letter and a colon, or a forward or backward slash
), it is relative to the ColdFusion temporary directory, which is returned by the GetTempDirectory
function.
Example:-
The following example deletes the testNote.txt
file from the d:\files\documents\textNote\
directory.
<cffile
action = "delete"
file = "d:\files\documents\textNote\testNote.txt"
>