Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Close File Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: File I/O VIs and Functions

Requires: Base Development System

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.


refnum is the file refnum associated with the file you want to close.
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 is the corresponding path to refnum.
error out contains error information. This output provides standard error out functionality.


Refer to the following VIs for examples of using the Close File function:

  • labview\examples\File IO\Datalog\Datalog File.lvproj
  • labview\examples\File IO\Datalog\Datalog File.lvproj


 Was this document helpful?  submit
  Helpful Not Helpful