Setting variable problem in .bat or .cmd script ?
Posted: 10 Sep 2020 15:39
Hi all, forum newbie here. I'm an old AIX/Linux guy but my wife has a side business that I need to support so I'm in the DOS world...
I thought I was trying to do something extremely simple. Either that's not the case or I'm just flat being dense....
In a .bat/.cmd file run from the command prompt, I just want to do:
If $Variable3 is NULL then set Variable3=0
Then printing out Variable_3 (just as a sanity check) I've tried every syntax I can find and think of, as well as a few others.
I'm just at a loss. It seems like it should be a straight forward "if then else" statement but....
Anyone set me straight?
Steve
I thought I was trying to do something extremely simple. Either that's not the case or I'm just flat being dense....
In a .bat/.cmd file run from the command prompt, I just want to do:
If $Variable3 is NULL then set Variable3=0
Then printing out Variable_3 (just as a sanity check) I've tried every syntax I can find and think of, as well as a few others.
I'm just at a loss. It seems like it should be a straight forward "if then else" statement but....
Anyone set me straight?
Steve