views:

181

answers:

3

I need to run the following command from the command line in Windows 7:

SumatraPDF.exe -inverse-search "\"C:\Program Files\eclipse\inverse_search.bat\" \"%f\" %l"

However I need to modify it a little, since my installation of Eclipse is located in here:

C:\Program Files (x86)\Eclipse (C++)

How do I escape this line correctly? Do I need to escape parenthesis and pluses too? Or is it just enough to escape double quotes?

+1  A: 

When in doubt, escape everything. I find that I don't need to escape (), %, or +, though.

+1  A: 
SumatraPDF.exe -inverse-search "\"C:\Program Files (x86)\Eclipse (C++)\inverse_search.bat\" \"%f\" %l"
voyager
A: 

I don't even think you need to escape the quotes; it should be enough to do:

SumatraPDF.exe -inverse-search ""C:\Program Files (x86)\Eclipse (C++)\inverse_search.bat" %f %l"

Luke