Close File Function
- Updated2025-07-30
- 2 minute(s) read
Closes an open file specified by refnum and returns the path to the file associated with the refnum.
Error I/O operates uniquely in this function, which closes the file regardless of whether an error occurred in a preceding operation. This ensures that files are closed correctly.

Inputs/Outputs
refnum
—
refnum is the file refnum associated with the file you want to close.
error in
—
error in describes error conditions that occur before this node runs. With the following exception, this input provides standard error in functionality. This node runs normally even if an error occurred before this node runs.
path
—
path is the corresponding path to refnum.
error out
—
error out contains error information. This output provides standard error out functionality. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\File IO\Datalog\Datalog File.lvproj
refnum
—
error in
—
path
—
error out
—