ClearMods

Top  Previous  Next

 

The ClearMods command allows you to clear the contents of the Subs list in the current User Section at runtime rather than at processing time as you would with the Subs command. When you run the command, all Subs assignments in the section are automatically deleted. This command would normally be used if you wish to change the Subs assignments after other processes have been actioned by the script.

 

Command Syntax

 

ClearMods:

 

The colon after the command is compulsory. Any additional spaces or characters will cause an error to be thrown. The command itself is not case sensitive.

 

Parameters:

 

No parameters are required

 

If any parameters are provided an error will be thrown.

 

Example:

 

[My Section]

; Clear any existing SUBS assignments

ClearMods:

; Add a new assignment

AssignMods:”AppVerName=”,”AppVerName=MyApp %%Version%%”,/LineStartsWith /ReplaceWholeLine /IgnoreCase

; Perform the substitution

ModifyFile:"C:\Test Text.txt","C:\Test Text (updated).txt"        

 

See Also: AssignMods Mod ModifyFile RegexReplace Variables