How to Run Multiple Commands in CMD

How to Run Multiple Commands in CMD

There are lots of points that you can do with the command punctual. For instance, you can make use of the best CMD commands to carry out standard things. Likewise, there are times when we wish to run several commands on Command Prompt.

You can execute numerous commands on the Command punctual however must do it by hand. Suppose I inform you you can run several commands simultaneously in Command Trigger?

You can run 2 commands in one line in Windows Command Motivate by developing a batch manuscript file using Note pad. Listed below, we have shared the most effective methods for running numerous commands in CMD on Windows. Allow’s examine them out.

1 Run Several Commands By Producing a Batch Script

This technique includes producing a batch script to run numerous commands. Utilizing this, you can execute all your commands one at a time instantly. For that, we are mosting likely to make use of the commands to reset the DNS cache of Windows-

  • ipconfig/ displaydns
  • ipconfig/ flushdns
  • ipconfig/ launch
  • ipconfig/ renew

1 To start with, open the Notepad on your computer system.

Notepad on your computer

2 Now, get in the commands you intend to implement with a solitary click. In this example, we make use of the 4 commands pointed out over.

enter the commands you want to execute with a single click enter the commands you want to execute with a single click

3 Next off, click the file and pick Conserve as an option.

Save as an option Save as an option

4 Currently save this data with the bat expansion. For example, DNSreset.bat

save this file with the .bat extension save this file with the .bat extension

5 If you desire to reset the DNS cache, double-click on the set manuscript documents.

reset the DNS cache reset the DNS cache

2 Utilizing Special Personalities

This approach will certainly implement some unique characters in between the commands concurrently. Adhere to the steps given below.

1 If you wish to run 2 or even more commands concurrently, simply insert the &&” in between the commands. For instance– ipconfig/ flushdns & & ipconfig/ restore

run two or more commands run two or more commands

2 If you want to execute the 2nd command after the success of the initial command, after that make use of the & & in between the commands. For instance– ipconfig/ flushdns && & ipconfig/ renew

execute the second command execute the second command

3 If you want to run the 2nd command just if the very first one fails to implement, enter || between the commands. For instance– ipconfig/ flushdns|| ipconfig/ restore

run the second command only run the second command only

This write-up is about running multiple commands in CMD on Windows I hope this post aided you! Please share it with your pals also. If you have any type of doubts, let us know in the comment box listed below.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *