I first introduced the topic of piping commands and their output in tips
0501 and 0823.
If you issue a Net USE Z: when Z: is mapped, you receive a display similar to:
Local name Z: Remote name \\ServerName\ShareName Resource type Disk Status OK # Opens 0 # Connections 9 The command completed successfully.If you issue a net use Z: >Nul when Z: is mapped, nothing is displayed.
When you issue a Net USE Z: when Z: is NOT mapped, you receive:
The network connection could not be found. More help is available by typing NET HELPMSG 2250.When you issue a net use Z: >Nul when Z: is NOT mapped, you receive:
The network connection could not be found. More help is available by typing NET HELPMSG 2250.To prevent output on both Stdout and Stderr, issue net use Z: 1>Nul 2>&1 and nothing will be displayed.
NOTE: There are two options:
1> pipes Stdout
2> pipes Stderr
> defaults to 1>.
0 comments
Hide comments