Function Reference


FileClose

Closes a previously opened text file.

FileClose ( "filehandle" )

Parameters

filehandle The handle of a file, as returned by a previous call to FileOpen.

Return Value

Success: Returns 1.
Failure: Returns 0 if the filehandle is invalid.

Remarks

Upon termination, AutoIt automatically closes any files it opened, but calling FileClose is still a good idea.

This function is also used to close search handles as returned by FileFindFirstFile().

Related

FileFindFirstFile, FileOpen, FileFindNextFile, FileFlush

Example


Local $handle = FileOpen("test.txt", 0)

FileClose($handle)