Can I specify multiple conditions with “or”/”and” in batch file if block?
If not that complex, can I at least use something like:
if value1 < value < value2
Basically my purpose is to check whether current system time falls in a certain interval(2.05 AM and 7.55 AM to be precise) and if it does, to execute certain commands.
Adding to dbenham’s answer, you can emulate both logical operators (AND, OR) using a combination of
ifandgotostatements.To test condition1 AND codition2:
To test condition1 OR codition2:
The labels are of course arbitrary, and you can choose their names as long as they are unique.