batch file newbie question

September 16, 2011 at 12:50:53
Specs: Windows 7
hello all,

i am very new to batch files and need some help.

i want batch file to do this:

1. open a command prompt
2. run a command say ipconfig
3. run another command after the first command say cls

just can somone please let me know how this can be achieved?

See More: batch file newbie question

Report •

September 16, 2011 at 13:06:26
Open Notepad and type

@echo off

Save as mybat.bat, double click on the saved file and you will see a command prompt window to be opened and ipconfig executed. I coded a pause statement otherwise the window vanishes at the end (cls would erase anything).

By the way you have to post in Programming Forum since there is no DOS in Win 7 and you are actually coding NT batch.

Report •
Related Solutions

Ask Question