I know this trick for a long time, but I can't found any useful application for it.

But perhaps have anyone else an use case.

Code: Select all
@echo off
echo One two three ^
four
echo One two three^
four
echo One two<nul three ^
four
echo One two<nul three^
four
As you can see in the fourth line the word/token "three" is removed, this is an effect of the redirection and a token just before a multiline caret.Output wrote:One two three four
One two three four
One two three four
One two four
This effect is not related to the ECHO, it works always.
It can strip a single token from a string like here
Code: Select all
set var=one two <nul "this & that"^
three
set var
Output wrote:one two three
But currently I didn't know what problem can be benefit by this

jeb