I Input es c:\^|d:\ show correct but Input
for /f %A in ('es c:\^|d:\') do echo %A show errors
es run errors
Re: es run errors
Thats no ES run error.
Its a simple CMD error message about the syntax of your command line.
Its a simple CMD error message about the syntax of your command line.
Re: es run errors
Use double quotes:
https://ss64.com/nt/for_cmd.html
Code: Select all
for /f %A in ('"es c:\^|d:\"') do echo %A
Re: es run errors
Without using double quotes, you need an extra escape-level, due to the for-command:
Code: Select all
for /f %A in ('es c:\^^^|d:\') do echo %A
Re: es run errors
how can use content | in the for
es c:\^|d:\ regex:content:”\bAB\b|\bBA\b” show ok,but input
for /f %A in ('"es c:\^|d:\ regex:content:”\bAB\b|\bBA\b”"') do echo %A
show error
es c:\^|d:\ regex:content:”\bAB\b|\bBA\b” show ok,but input
for /f %A in ('"es c:\^|d:\ regex:content:”\bAB\b|\bBA\b”"') do echo %A
show error
Re: es run errors
Please try:
Note ^| to escape |
The leading and trailing double quotes in and are removed when the command line is executed.
or, double escape special characters:
Code: Select all
for /f %A in ('"es c:\^|d:\ regex:content:"\bAB\b^|\bBA\b""') do echo %A
The leading and trailing double quotes in
('"
'")
or, double escape special characters:
Code: Select all
for /f %A in ('es c:\^^^|d:\ regex:content:"\bAB\b^^^|\bBA\b"') do echo %A