The below example is how to show IP address using simple batch file program. In the course, you will also learn how ro modify the script to suit your own requirment.
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 nodepad 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 extensio 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.