I'm trying to make a batch file to run the systeminfo
command in Windows 7, and narrow down the results to not show the Hot Fix Information - or just some specific lines.
Is there a way to do this without writing out the command multiple times? I.e., right now, I have the following:
systeminfo|find "System Boot Time"
systeminfo|find "Host Name"
systeminfo|find "OS Name"
etc.
The problem with this is it has to reload all the information from the systeminfo cmd for each new line, making it take fairly long. Is it possible to just run the command once and have |find pull up multiple lines?
If not, is it possible to remove information with another command? (I haven't heard of anything like this but not sure it doesn't exist)
You can use this:
@ECHO OFF &SETLOCAL
systeminfo|findstr /c:"System Boot Time" /c:"Host Name" /c:"OS Name"
For more information about findstr
please look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With