What is the DOS equivalent of 1>/dev/null? [duplicate]
Asked Answered
P

3

14

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?

Pistil answered 21/3, 2011 at 18:29 Comment(2)
See this answer #4507812 which works better for meErrantry
Possible duplicate of How to redirect stderr to null in cmd.exeBehindhand
K
21

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

Krigsman answered 21/3, 2011 at 18:32 Comment(0)
T
2

You can use like this

command >nul: 2>nul:
Tritheism answered 11/1, 2019 at 11:5 Comment(0)
A
0

Here's an example of using > NUL

copy mfc42d.dll $windir\system32 > nul
regsvr32 $windir\system32\mfc42d.dll /s > nul
Adopt answered 6/2, 2012 at 14:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.