Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm in E:\blah\blah but I need to run an .exe from E:\folder name\prgm.exe

However, I am trying to call this without having to do cd ..

I read that just typing E:\folder name\prgm.exe should work. However when I try this I get an error:

E:\folder is not recognized as an external or internal command.

I'm running Windows 7 if that helps.

share|improve this question

2 Answers 2

E:\folder name\prgm.exe works if the folder name has no space in it.

Either:

  1. Rename the folder so it has no space.
  2. Use quotes. (e.g. "E:\folder name\prgm.exe")
  3. Or add E:\folder name to the path.

Use option 3) if it is an often used program.
Use option 2) for single or rare invokations.

share|improve this answer
    
Thank you! I had originally tried moving it into a folder without a space, but it wasn't working since the command required an input file argument, for which I was forgetting the E:\... in front of that as well. I couldn't do the quotes since i was running this command from MATLAB which itself required quotes for syntax purposes. Thank you again! –  Bob Oct 20 '12 at 1:38
    
Indeed. Mis cut-and-paste. I will correct E:\folder name\prgm.exe to E:\folder name\ . Thank you for noticing. –  Hennes Oct 20 '12 at 2:22

Just for completeness' sake, I would like to note that in addition to Hennes' answer, there is a fourth option, though in fact you might find it too similar to cd:

Enter pushd E:\folder name and your working directory changes to the specified drive and folder (no quotes required) in one easy step; returning to the previous working directory is a no-brainer as well with a simple popd

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.