Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
how to redirect to screen and file
Name: vamsi Date: March 31, 2003 at 17:54:58 Pacific OS: windows 2000 CPU/Ram: 512
Comment:
How can we display the out put in a batch file to screen as well as to a file. I tried the following command but didn't work.
temp.bat >out 2>&1
But this is creating the out file but is not displaying on the screen simultaniously
Name: FishMonger Date: March 31, 2003 at 19:32:05 Pacific
Reply:
This may not be the best method, but it works. Edit your batch file to direct its output to a file then as the last line of the batch file have it type out the text file. here's an example.
@echo off cls ping -a 4.2.2.2 > ping-dns.txt type ping-dns.txt
0
Response Number 2
Name: DTec Date: March 31, 2003 at 19:32:51 Pacific
Reply:
Put the redirect symbol inside the batch file. For example, to redirect a directory listing to an output file and to screen using a batch file called LISTDIR.BAT, the contents of the BAT file would include the following:
Summary: Hi eso21 The only way I see how to do this is by using an old dos program that I got from an old PC magazine, it's called Say.com and it allows you to echo text and control codes to a file or the ...
Summary: I did not tell ANY lies about this, I DID already say I hate it, I have GOOD reasons for saying so. And you, leave my mother out of this, or we might just have to start questioning your personal gla...