Search code examples
batch-file

Colon in echo batch command


What does this command, found in a script, mean ?

echo run cmake build: %Some_Directory%\CMake\build.bat

cmake does have a build argument, but there should be hyphens :
cmake --build

Here is the echo documentation :
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490897(v=technet.10)

And an other documentation I found : https://ss64.com/nt/echo.html

The last one mentions the colon character, but located just after the echo command. The Microsoft's documentation doesn't mention it at all.

My knowledge of the batch language is very limited...

Thanks for help.


Solution

  • echo displays text, and so that command just displays the string run cmake build: %Some_Directory%\CMake\build.bat, and %Some_Directory% will be replaced by its actual value.

    Nothing after the echo command gets executed (except in cases where there's an unescaped &, |, or >).