Page 1 of 1

tasklist's filders's wildcard and escape sequences

Posted: 13 Apr 2016 09:59
by npocmaka_
Here Alex K.'d shown that tasklist filters accept * as wildcard if it is at the end.

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