Windows 10

Batch File To Get IP Address

In this tutorial, we are going to see how to get the IP address by using Find command. The batch file contains a series of DOS (Disk Operating System) instructions. It allows triggering the execution of commands found in this file.
 

Batch File To Get IP Address

The following example find the IP Address:

@echo off

ipconfig | find "ipv4" /i

Output:

IPv4 Address. . . . . . . . . . . : 192.168.0.145

One thought on “Batch File To Get IP Address

  • This is not working as a .bat file. If I run this in CMD directly it works but if I save the command into a .bat file all I get is a blank command window.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *