Batch if statement and set combination

December 22, 2010 at 08:47:30
Specs: Windows XP/Vista
I need to know if it is possible to combine an if command with a set command in a batch file.
I theorized this what the code would look like.

if age > 12 set /A final=age+time/cost
if age < 12 set /A final=age-time/cost

I there any way to do this?


See More: Batch if statement and set combination

Report •

#1
December 22, 2010 at 09:09:16
Yes there is.
Required reading:
if /?
set /?

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question