Batch export line to .txt

Microsoft Windows xp professional w/serv...
July 14, 2010 at 04:02:38
Specs: Windows XP SP3
I'm wanting to make a simple batch or vbs file that exports a line from the results of the command to a text file.

wmic bios get serialnumber


I only want the "Myserialnumber" value exported to the .txt.


See More: Batch export line to .txt

Report •

July 14, 2010 at 05:27:10
How about:

FOR /F "skip=1" %%a IN ('WMIC BIOS get SerialNumber') DO (
    ECHO %%a >>Serial.Number.txt

When your only tool is a hammer, every problem looks like a nail.

Report •

July 14, 2010 at 06:06:45
That did the trick.. thanks!

Report •

November 15, 2010 at 14:55:13
Now suppose that I want to set that serial number as a variable?

Report •
Related Solutions

Ask Question