Why help on the netstat utility is not redirected to a file?
dir /? > temp.txt
displays help for the dir command to a file without problems, and
netstat /? > temp.txt
– no. The output is in the console and the file temp.txt is created but is empty.
asked March 23rd 20 at 18:59
most likely the output goes to stderr. Design
2>&1 will redirect stderr to stdout
netstat /? 1>temp.txt 2>&1
Find more questions by tags Windowscmd/bat