Whatever message this page gives is out now! Go check it out!

GetProfileSections

Last update:
May 18, 2026

Description

Gets all the sections of an initialization file. An initialization file assigns values to configuration variables, also known as entries, that are set when the system boots, the operating system comes up, or an application starts. An initialization file has the suffix INI; for example, boot.ini, Win32.ini.

Returns

An initialization file, as a structure whose format is as follows:
  • Each initialization file section name is a key in the structure
  • Each list of entries in a section of an initialization file is a value in the structure
If there is no value, returns an empty string.

Category

Function syntax

GetProfileSections(iniFile, [encoding])

See also

History

ColdFusion 11: Added the optional parameter, encoding.
ColdFusion MX: Added this function.

Parameters

ParameterDescription
iniFile
Absolute path (drive, directory, filename, extension) of initialization file; for example, C:\boot.ini
encoding(Optional) Encoding of the initialization (ini) file. For instance "UTF-8" For a list of encodings, see cffile action = "read" .

Example

GetProfileSections(expandPath("./russian.ini"),"UTF-8");

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page