An IP (Internet Protocol) address is used to identify your computer, router or any other network devices in your network or internet. A typical home network router has two IP addresses: one for external internet (WAN) and the other for the internal home (LAN) connection. A router is a hardware device which uses software for performing the routing of data packets in an internal network. All routers are hardware firewalls. Batch file is a text file which contains a set of commands for the operating system of the computer. To get the router IP address from a batch file you need to create two files- getip.js and GetIP.bat by writing the right codes. Run the .bat file which will create .txt file called IP.txt containing your external IP address or internet IP address.