I am unable to divide using the divide operator provided in the SET command.
SET /A 216/18
SET /A div=216/18
ECHO %div%
Though this should work and it does in the command prompt window but when used through a batch script it gives a blank output.
like
ECHO is on.
Whats wrong?
Best Answer
This can happen if your
extenstions
are disabled. You can checksetlocal /?
andcmd /?
for more information aboutextensions
.But the
set /?
specifies:So without
extensions
the/A
does not work.You can add the
setlocal
-line to the top of your batchfile: