Show IP address using Simple Batch File Program
The below example is how to show IP address using simple batch file program. In the course, you will also learn how to modify the script to suit your own requirement.
Batch file extension is .bat. Once file with extension .bat is clicked, it executes the dos command and show you the result in command prompt.
We are going to use this feature and type few command to get the IP of your computer displayed quickly. So, Lets get started: -
1. Open the notepad and type following command in it -
2. Click on File -> Save As and type the name of file "ip.bat" and save the file to your preferred location in your computer. The file name can be anything but .bat extension is compulsory.
3. After the file is saved, click on the file "ip.bat". It will execute the commands we typed in the notepad and will display the IP address in the command prompt.