Skip to main content

Delete-Key

Command Description

Delete the specified key in the specified section of the INI config file

Command Prototype

INI.DeleteKey(sFile, sSection, sKey)

Parameter Description

ParameterRequiredTypeDefaultDescription
sFileTruepath'''C:\Users'''The path of the INI file
sSectionTruestring""Name of the section in the INI file to be deleted
sKeyTruestring""Name of the key to delete in .ini file

Demo

/************************************Delete key************ **************************** 
Command prototype:
INI.DeleteKey('''C:\Users''', "", "")
Input parameters:
sFile--path where the INI configuration file is located
sSection--name of the section to delete the INI configuration file
sKey--key name to delete the INI configuration file
Outgoing parameters:
None
********************************************************************************/
Dim sFile='''C:\Users\Chance\Desktop\testINI\data.ini'''
Dim sSection="IDP"
Dim sKey="OCR"
INI.DeleteKey(sFile,sSection,sKey)