How to escape parameter in windows command line?

前端 未结 3 1894
余生分开走
余生分开走 2020-12-11 03:27

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\\\"

相关标签:
3条回答
  • 2020-12-11 03:44

    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"
    
    0 讨论(0)
  • 2020-12-11 03:47
    SumatraPDF.exe -inverse-search "\"C:\Program Files (x86)\Eclipse (C++)\inverse_search.bat\" \"%f\" %l"
    
    0 讨论(0)
  • 2020-12-11 03:48

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

    0 讨论(0)
提交回复
热议问题