INI files

<< Click to Display Table of Contents >>

Navigation:  Actions >

INI files

INI files have been used as configuration files since the earliest Windows versions. These are plain text files that can be viewed and edited in any text editor and have the following format:

 

[section1]

var1=value1

var2=value2

 

[section2]

var1=value1

var2=value2

 

[section3]

var1=

var2=

 

The file consists of sections, which are enclosed in square brackets. The section names must be unique and must not be repeated. Each section contains parameters that consist of a name and a value and are separated by an "=" (equal) character. Parameter names must be unique within their section. Values can be empty, i.e. a blank line after the "equal" character.

 

Section names, parameter names and parameter values must be single-line. Multiline values can be combined into a single line by using a delimiter line when saving. During reading such values can be restored to multiline values again. For example, string1{eol}string2{eol}string3, where {eol} is the separator.

It is still common practice to use INI files to save/read local configurations, which (in contrast with the registry) can be copied and moved around.

 

 

note Related Topics

INI read value

INI write value

INI delete value

INI delete section

INI loop