-->

What is the DOS equivalent of 1>/dev/null? [duplic

2019-04-19 12:36发布

问题:

This question already has an answer here:

  • How to redirect stderr to null in cmd.exe 1 answer

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?

回答1:

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



回答2:

Here's an example of using > NUL

copy mfc42d.dll $windir\system32 > nul
regsvr32 $windir\system32\mfc42d.dll /s > nul


回答3:

You can use like this

command >nul: 2>nul:


标签: dos dev-null