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

None.

 

Remarks

If filehandle is invalid, an AutoIt runtime error will be thrown, and the script will terminate!
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

 

Example


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

FileClose($handle)