Rat
Not bored. Never bored.,
It's embarrassing to have to ask such a basic question, but it is literally years since I did anything meaningful at the Windows command line, and I've forgotten a lot of even the most basic stuff.
What I want is to be able to run a command in a batch file, send selected parts of its output to file, and then open the text file. To pick an example, let's say I want the host name of the machine running the batch file (I realize there are easier ways to get this, but bear with me). So the batch file could call "ipconfig /all", for example, to get the host name. How can I then write the single line containing this information to file? If I want to pick several different lines from several different commands' outputs, how do I output them all to the same file, appending each after the last?
Any pointers would be appreciated.
What I want is to be able to run a command in a batch file, send selected parts of its output to file, and then open the text file. To pick an example, let's say I want the host name of the machine running the batch file (I realize there are easier ways to get this, but bear with me). So the batch file could call "ipconfig /all", for example, to get the host name. How can I then write the single line containing this information to file? If I want to pick several different lines from several different commands' outputs, how do I output them all to the same file, appending each after the last?
Any pointers would be appreciated.