Grault
Grault

Reputation: 1110

Prefixed PATH, now cmd and help are not operable commands

Scenario: I found the awesome Console2 http://sourceforge.net/projects/console/ and set about making three environments for it: Cygwin, raw Windows, and GnuWin32. The first two work fine, but the third is being very difficult.

I saved this file as cmdrc.bat in my user directory and told Console it was my GnuWin32 tab's shell.

set PATH="C:\gnuwin32\bin;C:\gnuwin32\include\glibc;%PATH%"
echo %PATH%
cmd
help
ls

By opening Command Prompt and pasting that code (so the window doesn't disappear), I get:

C:\Users\Chris>set PATH="C:\gnuwin32\bin;C:\gnuwin32\include\glibc;%PATH%"

C:\Users\Chris>echo %PATH%
"C:\gnuwin32\bin;C:\gnuwin32\include\glibc;[all the correct stuff that was there before]"

C:\Users\Chris>cmd
'cmd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Chris>help
'help' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Chris>ls // GnuWin32 isn't available, either.
'ls' is not recognized as an internal or external command,
operable program or batch file.

Do I have invalid syntax in my set, or what?

Upvotes: 0

Views: 1129

Answers (1)

Ansgar Wiechers
Ansgar Wiechers

Reputation: 200193

Remove the double quotes from the PATH definition.

set PATH=C:\gnuwin32\bin;C:\gnuwin32\include\glibc;%PATH%

Upvotes: 1

Related Questions