There are two major problems.
Goto's inside brackt doesn't work as expected, they stop the loop immediately, so your code will simply fail there.
The solution is to avoid goto
or to call a function and use the goto
there.
The second problem are the compares.
if one==two (
will be always false, as it compare the word one
against the word two
, but not the content of the variables.
Normally you would use if "%one%"=="%two%" echo equal
, but as it should work inside of brackets you need delayed expansion, so it looks like.
if !one!==!two! echo equal
Don't forget to enable the delayed expansion before you start the loop with
setlocal EnableDelayedExpansion