Thursday, October 9, 2014

batch - WMIC Output Result - Remove Blank Line?

This script does what I want it to do - producing the result in the txt file noted.


(@for /F "delims=" %I in ('wmic path Win32_VideoController get DriverVersion /VALUE') do @for /F "tokens=1* delims==" %J in ("%I") do @echo/%K) > "C:\Users\Public\AppData\Roaming\GPU\DriverVersion.txt"

However, it seems to add an extra blank line at the bottom of the result. Is there any way I can stop this from happening as the line count result from this txt is very important?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...