I need your help for a batch file that I am trying to develop in a windows environment.
I have a string that contains a set of parameters split up by a hyphen like this:
rossi-mario-rome-01031998
I need to check if the length of each of these 3 parameters doesn't exceed the maximum value defined in an array like this:
set /a arraylen[1]=30
set /a arraylen[2]=30
set /a arraylen[3]=20
set /a arraylen[4]=8
In case of the parameter's length exceeds the value defined in the array, a variable should be set to 1 and the script should be ended.
Please, can you help to develop such a script?