Path variable and quotes

I have a variable containing a path (PathToDocument) which I need in a shell command (Windows). I need quotes around the path so I can feed it to an executable in the correct way like:

app.exe -e -p “c:\tools\jan 2020\myfile.txt”

The command should be: MyShell.Execute("app.exe -e -p " + PathToDocument) where the actual path should be within quotes like above. I tried several solutions but no success. I end up with the variable name in quotes…

MyShell.Execute( "app.exe -e -p """ + PathToDocument + """" )

Four quotes! Thanks Kem.

Technically, two double-quotes within a static string represent a single double-quote.

For sake of completeness, you can also use Chr(34), or its API 2.0 equivalent.
Just be aware that all these will break if the PathToDocument itself contains a quote!
(I don’t recall whether Windows allows quotes in file name, as the list of forbidden characters is quite long there, but shares/disks from other operating systems would allow them).

Use the second argument for shell.execute
https://documentation.xojo.com/api/os/shell.html#shell-execute