3
Contributors
4
Replies
16
Views
3 Years
Discussion Span
Last Post by gerbil
1

Try this:
if "%2" == "" goto end
It has been a long time since I have written any complex DOS/Windows batch commands, so I may be mistaken... :-)

Votes + Comments
Thanks for your help it worked
0

Figured it out right before you replied and I did the same thing you said and it worked. Thanks!!

0

Turning ECHO on might have guided you to the answer. You were testing %2 = empty as null - If tests strings.
But if the wish was to print 1 2 3 then there is no need for %2...
IF "%1" == "" GOTO end
would work. A sprinkling of pauses can help, too.
I hope that made sense.

Edited by gerbil

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.