You could make a token variable that could keep track of the order of the commands.
set $addtok(%commandtokenname, $2, 32)
then find the token number
set %linenumbertobeerased $findtoken(%commandtokenname, $2, 32)
you would then delete the token and the line
set $deltok(%commandtokenname, %linenumbertobeerased, 32)
write -dl %linenumbertobeerased Commands.html
you could also use a while loop to iterate over the document for the line containing the text
var %c $2
var %l $lines(Commands.html)
var %i 1
while (%i < %l) {
tokenize 32 $read(Commands.html, n, %i)
if (%c == $4) { write -dl %i Commands.html }
inc %i
}