0

I am connecting to a windows server (2012R2 64 bit) running cygwin (latest version that i downloaded from cygwin.com yesterday) using putty.

I am trying to run cmd.exe and pass the cmd.exe a command that is located in "Program Files (x86)".

this is what i am trying run: cmd.exe /C "c:\program files (x86)\ibm\rationalsdlc\clearcase\bin\cleartool.exe"

and i get: 'c:\program' is not recognized as an internal or external command, operable program or batch file.

i tried it with "\" and with "\" and got the same message.

when i doubled the brackets (") like this: cmd.exe /C ""c:\program files (x86)\ibm\rationalsdlc\clearcase\bin\cleartool.exe""

i got -bash: syntax error near unexpected token `('

When i tried to pass a different string with no spaces in the path for example: cmd.exe /C "ccperl C:\utils\find-locked-vobs.pl" it works OK and the perl script runs OK.

How do i pass a command when the pass contains spaces?

Thank you David

2
  • why do you need cmd to run it ?
    – matzeri
    Jun 3, 2016 at 14:34
  • This is the way the client is implemented
    – doc
    Jun 3, 2016 at 15:23

1 Answer 1

2

Assuming you are running bash and you want to pass the full windows path to cmd, you should use single apostrophe and not double

cmd /c 'C:\Program Files (x86)\Adobe\Reader 10.0\Reader\acrord32.exe'

works fine for me.

0

You must log in to answer this question.

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