13

I want to suppress the output of my script running under DOS, similar to the following under a *nix environment:

 $ command 1>/dev/null

How can I do this?

Zaid
  • 36,680
  • 16
  • 86
  • 155

3 Answers3

21

It should be >NUL on both DOS and Windows console.

geekosaur
  • 59,309
  • 11
  • 123
  • 114
1

You can use like this

command >nul: 2>nul:
0

Here's an example of using > NUL

copy mfc42d.dll $windir\system32 > nul
regsvr32 $windir\system32\mfc42d.dll /s > nul
Jim Lahman
  • 2,691
  • 2
  • 25
  • 21