Question : List of Server Names Query for IP

I have a list of approxiamately 300 servers names in an excel spreadsheet that I copied to a test file (one servername per line). I need to run a command or utility that will give me the IP of each server. NSlookup doesnt apear to have a file import function and many of the port scanners only take list of ip to resolve to name. Any ideas?

thanks

Answer : List of Server Names Query for IP

The filename is whatever.bat.  You run it by typing 'whatever'.

You need to have the input file in the same directory or specify the full path name to the file.

Modify 'MyFilename.txt' and 'Results.txt' to what you would like.

This should work according to all of the batch scripting that I've read:

@echo off
for /F %a in MyFilename.txt do nslookup %a >> Results.txt
Random Solutions  
 
programming4us programming4us