How to Pass Command Line Parameters to windows Bat File

Hi Friends,

This also gonna be small tutorial.

if you want to pass some parameters to windows bat file.what would you do.

let me explain

first open new text file and type @echo off

in windows environment %0 is file name

let me make you short list this

 

Lets go through quick scenario.I have three arguments Python,Perl ,Bash i want to print this as

First Parameter is Python

Second Parameter is perl

Third Parameter is bash

lets create our bat file .i called this lang.bat

Create new test file and

 

now go to save as give name lang.bat and select file type to all.

Open terminal and go to file destination and enter as follow

 

I hope you enjoy this tutorial unless it too short.if you like my website please share on Facebook,Twitter and Google Plus

 

Have a good day

Leave a Reply

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