Bit of a tricky one. How can I correctly escape the following in a batch file?
echo /? display this help text
This particular combina
For escaping echo arguments exists many variants, like echo.
, echo:
, echo=
But only echo(
seems to be secure against any appended text.
These one fails, if files exists like echo
, echo[
, echo]
or echo+
echo.
echo[
echo]
echo+
These one fails, if a file in the current directory exists named my.bat
echo\..\my.bat
echo:\..\my.bat
echo.\..\my.bat
These one fails independet of a file
echo/?
echo,/?
echo;/?
Only the echo(
seems to be always safe against any content
For escaping echo arguments, you can use the alternative syntax echo.
:
echo./?