Running remote ssh command with spaces?

I am trying to run a remote script in windows over ssh, and I cannot figure out how to handle the quotes. (Both host and client are windows machines.) This is the statement which works fine on the host machine:

C:\> python "C:\folder path\file.py"

I have looked seemingly everywhere, and tried seemingly everything, but I cannot get this to work:

C:\> ssh user@ipaddress "python ""C:\folder path\file.py"""
python: can't open file 'C:\folder': [Errno 2] No such file or directory

I have tried using double quotes, I have tried single quotes, I have tried '\' as an escape character, I have tried '^', and nothing seems to pass the string correctly. Any help?!

EDIT: A user suggested I use '-v' with ssh to track the path. Doing that, it looks like the double quotes actually do what I expect, but somehow the host machine misinterprets the command, and objects to the space. Not sure why...

To be clear, using this:

C:\> ssh -v user@ipaddress "python ""C:\folder path\file.py"""

I see this in the results:

debug1: Sending command: python "C:\folder path\file.py"
python: can't open file 'C:\folder': [Errno 2] No such file or directory

AGAIN, to be more clear, this command works PERFECTLY when I am phsyically at the host machine:

C:\> python "C:\folder path\file.py"

So, I am unclear why/where this is getting screwed up. Thanks for any help, you all have helped immensely thus far.


I found this worked for me, although it was not related to paths, but services:

ssh username@ipaddress 'net start \"TightVNC Server\"'

The OpenSSH ssh is *nix application, so *nix rules apply when parsing its command-line

ssh user@ipaddress "python \"C:\folder path\file.py\""