Friday, 14 December 2012

Create batch file using Notepad

you can start scripting by creating basic batch files in Notepad and run it in windows command prompt. One of the great things about the command prompt is that anything you can execute at the command prompt, you can embed as a script in a batch file. Even better, anything you can script, you can automate. While there are more advanced tools you can use to create batch files, the simplest tool, Notepad, can meet most of your needs. Notepad is a simple text editor that you can use to create batch files easily. As a simple example, you can use the following steps to create a batch file in Notepad:
Open Notepad or create a text file(right click in windows explorer > new > text document). in this file we will make one line script that will show IP configuration of your PC. now write ipconfig in the notepad or text file and save it(ctrl+s) and give extension as .bat. for example ip_config.bat. 

How to run the batch file
to run batch file open command prompt.(start > run > write "cmd" > enter). now go to the file directory using cd command. and after reaching to the right batch file directory(folder) enter file name and press enter. In my case ip_config.bat

1 comment: