tasklist's filders's wildcard and escape sequences
Posted: 13 Apr 2016 09:59
Here Alex K.'d shown that tasklist filters accept * as wildcard if it is at the end.
With some experiments I've found that double quotes can be escaped with \" unless it is the last symbol:
and backslash can be escaped with \\
I haven't found other c-like escape or wildcard sequences. Probably there are because this gives an error:
Code: Select all
tasklist /FI "IMAGENAME eq cmd.e*"
With some experiments I've found that double quotes can be escaped with \" unless it is the last symbol:
Code: Select all
title "aaa"
tasklist /FI "WINDOWTITLE eq \"aaa*"
and backslash can be escaped with \\
Code: Select all
title \\
tasklist /FI "WINDOWTITLE eq \\\\"
I haven't found other c-like escape or wildcard sequences. Probably there are because this gives an error:
Code: Select all
title \r
tasklist /FI "IMAGENAME eq \r"
ERROR: Invalid query