Search code examples
batch-filecmddos

Cmd: how to let bat file redirect output to something like /dev/null?


Under unix, I could simple ABC >/dev/null to avoid any output to screen. But under windows' cmd, using ABC > NULL will create a file named "NULL". But how to archive the /dev/null like unix?

Thanks a lot.


Solution

  • You are pretty close. Try NUL instead of NULL.

    ABC > NUL