In a FOR /F
statement, some characters needs escaping, here a list(taken and edited from Rob van der Woude's page)
Character | Escaped Result | Remarks |
---|---|---|
' | ^' | Only needed in FOR /F 's brackets, unless usebackq is specified. |
` | ^` | Only needed in FOR /F 's brackets, when usebackq is specified |
, | ^, | ┒ |
; | ^; | ┃ |
= | ^= | ┣ Must be escaped in FOR /F 's brackets, even if it is double-quoted |
( | ^( | ┃ |
) | ^) | ┙ |