1.

Solve : batch file output to screen and text file?

Answer»

Hi,

I'm TRYING to create a BATCH file that can send the output to the sceen and the same TIME create a text file. When I send the output to a text file, the screen output won't appear??

(
ipconfig/all | find "IP Address"
ipconfig/all | find "Subnet Mask"
ipconfig/all | find "Default Gateway"
ipconfig/all | find "Host Name"
) > logfile.txt
pause

THANKS in advance.No, if you redirect your command output to a file, the output of the command will not appear on the screen.Just add another line to your batch file.

type logfile.txt

This will display the CONTENTS of the text file.It works!! Thanks



Discussion

No Comment Found