tasklist's filders's wildcard and escape sequences

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
npocmaka_
Posts: 516
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

tasklist's filders's wildcard and escape sequences

#1 Post by npocmaka_ » 13 Apr 2016 09:59

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

Post Reply