Whatever message this page gives is out now! Go check it out!

File functions

Last update:
May 18, 2026
Function Description
FileCloseCloses an on-disk or in-memory file that is open.
FileCopyCopies a specified on-disk or in-memory source file to a destination file.
FileDeleteDeletes the specified on-disk or in-memory file on the server.
FileExistsDetermines if a file exists.
FileIsEOFDetermines whether ColdFusion has reached the end of the file while reading it.
FileMoveMoves a file from source to destination.
FileOpenOpens a file.
FileReadReads an on-disk or in-memory text file or a file object created with the FileOpen function.
FileReadBinaryReads an on-disk or in-memory binary file into a binary object.
FileReadLineReturns the next line of a file.
FileSeekShifts the file pointer to a specified position.
FileSetAccessModeSets the attributes of an on-disk file on UNIX or Linux.
FileSetAttributeSets the attributes of an on-disk file in Windows.
FileSetLastModifiedSets the date when an on-disk or in-memory file was most recently modified.
FileSkipBytesShifts the file pointer by the given number of bytes.
FileUploadUploads file to a directory on the server.
FileUploadAllUploads all files sent to the page in an HTTP request to a directory on the server.
FileWriteWrites the entire content to the specified on-disk or in-memory file
FileWriteLineAppends the specified text to the file object.
GetCurrentTemplatePathGets the path of the page that calls this function.
GetFileFromPathExtracts a filename from an absolute path.
GetFileInfoReturns information about on-disk or in-memory file.
GetProfileSectionsGets all the sections of an initialization file.
GetProfileStringGets an initialization file entry.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page