I m using logical operators and tasklist
command in a single sentence but it is not working. My batch script:
tasklist \fi"memusage gt 18000" && \fi"memusage lt 19000"
Can anyone help me out?
:: ↓ ↓
tasklist /fi "memusage gt 18000" /fi "memusage lt 19000"
:: ↑ ↑↑ ↑
Explanation (see tasklist /?
output):
↓
use /FI
(solidus) instead of \FI
(reverse solidus)↑
separate /FI
switch from filter itself using a space;↑↑
simply concatenated filters mean logical AND
(cf. the last example in tasklist /?
).BTW, &&
operator means Conditional Execution on command level only.