I need help with CMD scripts. Here is my problem:
I have list of items, also I have variable which show for example current version of SDK.
set CURRENT_VERSION = 2.3
set LIST_OF_ITEMS = (4.0.3 2.3.3 2.2)
I want to write something like this
for %%A in %CURRENT_VERSION % do (
if [%%A] grt [%SDK_VERSION%] (
echo greater.
)
)
Also I want to now what must I write to break or continue in for.
This code is almost the same you wrote, but it works.
However, I think the comparison is done in reversed order, so it should be:
Note that version numbers are compared like strings. If you want to have right results with these numbers, then they both must have the same format; that is: