Troubleshooting the PATH Environment Variables in Windows


Have you been freaking out whole day about why the heck the command prompt keeps throwing an error instead of just executing it, saying that

‘foo’ is not recognized as an internal or external command,
operable program or batch file.

and you can clearly see that c:\foo is in the PATH of the Environment Variables.

When I tell you that you have an extra space just after the ; then you’d be like “hey! that was pretty easy man!”.

In case you are still in a limbo, let me tell it the ol’fasioned way.

Remove any spaces after of before the semicolon that separates paths in the PATH variable otherwise system cannot find the program you want to run from the command prompt.

The program foo won’t work:

PATH=c:\windows\system32; c:\foo;c:\bar\bin
PATH=c:\windows\system32;c:\foo ;c:\bar\bin

I hope that helps someone out there.

Advertisements