This is a question for the batch pro\'s i guess. Seems a lot of people do stumble over IP veriffication while batching, while just using windows built in functinallity, but
there is no GNU BRE to validate dotted IPs. FINDSTR
s REGEX capabilities are below that. You can use grep for Windows and GNU ERE:
ECHO(%IP%|GREP -E "(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])"&&ECHO %IP% IS VALID/||%IP% IS NOT A VALID IP.