Re: winscp.exe "mySession" /open "path" will open dir or file
a) directory (start WinSCP, if not started... and) open the directory,
Use
winscp.exe sftp://example.com/directory/to/open/
The trailing slash is important.
See https://winscp.net/eng/docs/commandline#session
b) file (start WinSCP, if not started... and) open the file in EXTERNAL editor.
That's bit problematic as it requires WinSCP to run in the background watching for the edited file. But how? Hidden completely? Just a tray icon? Not sure about that.