Search code examples
windowscmdpipenotepad

Windows Piping to a file from CMD


Quick question that I couldn't find an answer to. When piping to a file as such:

echo "hello" > hello.txt

does this operation actually call notepad.exe on Windows, or is this a non application level file operation?


Solution

  • No, echo is a builtin command in the windows Command Prompt (cmd.exe) used to display/output messages.

    The output redirector, >, followed by a file path makes cmd.exe write the message to that file instead of to your screen.


    You can see the full list of builtin commands in cmd.exe by typing help at the command prompt