Multiple checks in IF
Posted: 18 Mar 2011 04:52
Hi guys
Is there a way to perform multiple checks in single IF condition using the || or && operators
like example:
my script has to take hostnames which starts with either of these 5 characters : s; S; n; N; 10
What I am asking is can i put something like this
IF "%hostname:~0,1%" EQU "s" || "S" || "n" || "N" || "10" (do x) else (do y)
Is there a way to perform multiple checks in single IF condition using the || or && operators
like example:
my script has to take hostnames which starts with either of these 5 characters : s; S; n; N; 10
What I am asking is can i put something like this
IF "%hostname:~0,1%" EQU "s" || "S" || "n" || "N" || "10" (do x) else (do y)