Forwarding all batch file parameters to inner command

Szopinski picture Szopinski · Jul 24, 2012 · Viewed 15.1k times · Source

For my comfort in Windows, I want to prepare some PHP tools launched like in Unix.

f.e.: composer create-project symfony/framework-standard-edition path/

Not: php composer.phar create-project symfony/framework-standard-edition path/

I made composer.bat file in system path dir:

php C:\path\to\composer\composer.phar

and its works in simply usage. But how to forward all parameter and flags to command inside?

Answer

marapet picture marapet · Jul 24, 2012

in your batch file composer.bat, simply put:

php C:\path\to\composer\composer.phar %*