batch-file – Escaping special characters – FOR /F Special Characters

FOR /F

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
( ^(
) ^)

if you want to reproduce, please indicate the source:
batch-file – Escaping special characters – FOR /F Special Characters - CodeDay