Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Say I have a program called program.exe, and I want to run it from the command line. Assume further that I'm at the command prompt, and in the same directory as the program.exe

For some reason, I cannot run the program by typing:


Rather, I have to type in:


Then the program will run.

I'm not sure what I did that caused it to behave this way. Even the simple ping utility also requires me to type ping.exe.

Strangely, I tried typing "copy" and it still recognizes it. Or is that not an executable?

share|improve this question
up vote 4 down vote accepted

Copy is an inbuilt command, indeed.

I assume you're familiar with editing your PATH, however in the envronment variables menu, there's another one called "PATHEXT", which holds filetypes to execute without the extension (I used it to add ".py", to execute python scripts). Check to make sure .exe is in there. If not, I've never come across this before!

share|improve this answer
Perfect. Thank you for the answer. – sivabudh Feb 11 '10 at 22:05
C:\>set pathext

When you run program, the command interpreter will look for program,, program.exe, etc. If you've lost .exe from this list, that would explain what you're seeing.

copy is a built-in to the command interpreter, and not a separate .exe or .com. In other words, cmd.exe specially recognizes that word and handles copying itself, instead of calling another program. (As opposed to xcopy.exe, which is not a built-in command.)

share|improve this answer
It's a bit strange copy is built-in and help is not. – grawity Feb 12 '10 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .