Batch file and netsh.exe

Hewlett-packard / DL 380 G5
January 14, 2009 at 11:42:01
Specs: Windows 2003 server, Xeon 3.0/1024MB
I have a text file that will have 2 entries per line. They are servername and a IP address. I would like to create a batch file that would parse each line in the text file to be fed into two variables (one for server name one for the ip address) and then feed these into netsh.

The text file would look like this:

The netsh command is:
netsh wins server \\winsserv1 add name name=%var1% IP={%var2%}

Is there any way to create a batch file to do this?

See More: Batch file and netsh.exe

Report •

January 14, 2009 at 13:05:14
Nevermind I am an idiot I had a typo in my for statement for delims...

Report •
Related Solutions

Ask Question