Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SET PATH in batch file

Tags:

php

batch-file

I am still getting this error.

> 'php' is not recognized as an internal or external command, operable program or batch file.

This is how i set the path in my batch file

SET PATH = %PATH%;"C:\wamp\bin\php\php5.5.12\php.exe"
like image 368
jemz Avatar asked Mar 07 '26 14:03

jemz


1 Answers

SET PATH=%PATH%;C:\wamp\bin\php\php5.5.12\

You add directory path to the %PATH%, not file path.

Do consider what context you are calling this.

You cannot have a batch file that you load from file Explorer and expect the Environment to be global.

The %PATH% is only updated in the command prompt instance running the batch script.

like image 193
user3747345 Avatar answered Mar 09 '26 03:03

user3747345



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!