Creating new commands on your windows machine

Many a times we execute some commands repeatedly, which leads in waste of some time. Also some times you many want to create some commands and execute those directly instead of traversing to that directory and executing.


In such situation you can create a simple batch file which will contain your commands or path of executable which you want to execute in bunch. After that your work will be just to execute that batch file.


To create your own commands follow these steps:

  1. Create a batch file containing your path of executable or commands you want to execute.
  2. Place all these file at  directory. 
  3. Now go to Run prompt and just type name of your batch file.
If you don't want to risk your Windows directory, then you can do do following things, but please do these steps carefully:
  1. Create a batch file containing your path of executable or commands you want to execute.
  2. Place all these file at single directory on any drive.
  3. Right click to My Computer, Click on Properties. 
  4. On System Properties dialog, open Advanced Tab.
  5. Click on Environment Variables button.
  6. Under System Variables group, select Path environment variable. Click on Edit button.
  7. At the end of the value of variable place a semicolan and above directory path(step 2). 
  8. Please insure that you are just to appending to current path not overriding. Modifying current path will make harm to your computer.
  9. Thats it and you are done.  

No comments:

Post a Comment

Golang: Http POST Request with JSON Body example

Go standard library comes with "net/http" package which has excellent support for HTTP Client and Server.   In order to post JSON ...