How do I send a program’s output to a NULL device?

A. If you want to suppress a program’s output, you can use the NULL device (as you would use UNIX's /dev/null command). To make a program output to the NULL device instead of the screen, enter the following command.

program.exe > nul

You can also use the nul command if you want to blank a file, as the following example shows.

copy nul file.name
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish