Use the Configuration File VIs to read and create standard Windows configuration settings (.ini) files and to write platform-specific data, such as paths, in a platform-independent format so that you can use the files these VIs generate across multiple platforms. The Configuration File VIs do not use a standard file format for configuration files. While you can use the Configuration File VIs on any platform to read and write files created by the VIs, you cannot use the Configuration File VIs to create or modify configuration files in a Mac OS or Linux format.
Refer to the labview\examples\file\config.llb for examples of using the Configuration File VIs.
![]() |
Note The standard extension for Windows configuration settings files is .ini, but the Configuration File VIs work with files with any extension, provided the content is in the correct format. |
A standard Windows configuration settings file is a specific format for storing data in a text file. You can programmatically access data within the .ini file easily because it follows a specific format.
For example, consider a configuration settings file with the following contents:
[Data]
Value=7.2
You can use the Configuration File VIs to read this data, as shown in the following block diagram. This VI uses the Read Key VI to read the key named Value from the section called Data. This VI works regardless of how the file changes, provided the file remains in the Windows configuration settings file format.

Windows configuration settings files are text files divided into named sections. Brackets enclose each section name. Every section name in a file must be unique. The sections contain key/value pairs separated by an equal sign (=). Within each section, every key name must be unique. The key name represents a configuration preference, and the value name represents the setting for that preference. The following example shows the arrangement of the file:
[Section 1]
key1=value
key2=value
[Section 2]
key1=value
key2=value
Use the following data types with Configuration File VIs for the value portion of the key parameter:
The Configuration File VIs can read and write raw or escaped string data. The VIs read and write raw data byte-for-byte, without converting the data to ASCII. In converted, or escaped, strings LabVIEW stores any non-displayable text characters in the configuration settings file with the equivalent hexadecimal escape codes, such as \0D for a carriage return. In addition, LabVIEW stores backslash characters in the configuration settings file as double backslashes, such as \\ for \. Set the read raw string? or write raw string? inputs of the Configuration File VIs to TRUE for raw data and to FALSE for escaped data.
When VIs write to a configuration file, they place quotation marks around any string or path data that contain a space character. If a string contains quotation marks, LabVIEW stores them as \". If you read and/or write to configuration files using a text editor, you might notice that LabVIEW replaced quotation marks with \".
LabVIEW stores path data in a platform-independent format, the standard Linux format for paths, in .ini files. The VIs interpret the absolute path /c/temp/data.dat stored in a configuration settings file as follows:
The VIs interpret the relative path temp/data.dat as follows: