Function Reference

IniDelete

Deletes a value from a standard format .ini file.

IniDelete ( "filename", "section" [, "key"] )

 

Parameters

filename The filename of the .ini file.
section The section name in the .ini file.
key [optional] The key name in the in the .ini file to delete. If the key name is not given the entire section is deleted.

 

Return Value

Success: Returns 1.
Failure: Returns 0 if section/key is not found or if INI file is read-only.

 

Remarks

A standard ini file looks like:
[SectionName]
Key=Value

If filename is not found, a 0 byte file is created.

 

Related

IniRead, IniWrite, IniReadSection, IniReadSectionNames

 

Example


IniDelete("C:\Temp\myfile.ini", "section2", "key")