Description
Deletes the specified on-disk or in-memory file on the server.
Category
Function syntax
FileDelete(filepath) |
See also
FileClose, FileIsEOF, FileOpen, FileRead, FileReadLine, FileWrite, cffile
History
ColdFusion 8: Added this function.
Parameters
Parameter |
Description |
---|---|
filepath |
Pathname of the on-disk or in-memory file to delete. If 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. |
Usage
Use this function to free the memory used by an in-memory file. For more information on using in-memory files, see Working with in-memory files in the Developing ColdFusion Applications.
Example
The following example deletes the file c:\productiondir\test1.txt before moving c:\testdir\test1.txt:
<h3>FileDelete Example</h3>
|