Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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 >).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading