I need four command prompt commands to run in one batch file. It should run from top to bottom. The commands are:
ipconfig /flushdns
ipconfig /release
ipconfig /renew
exit
To perform commands in a batch file, first of all start it with @echo off
then put your first command, then second.... and then you can end it with exit
(Though it isn't 100% neccesary)
@echo off
ipconfig /flushdns
ipconfig /release
ipconfig /renew
exit /b
To save this as a batch file do the following:
notepad
File > save
)Save as type:
list, select All files (*.*)
.bat
Save
or press ENTERAnd that's it, your batch file will now perform the specified commands when it's launched
You mean four commands to run from one batch file. Actually that's what batch files are for!
1.Open Notepad or any text editor.
2.Type each command on a separate line, in the order you want.
3. Save the file as firstBatch.bat
4. Close your text editor.
When you run that batch file (I hope you know how), they will all run as you want.