You have posted it two days ago only!?!
And again, you can always use forward slash.
To be honest, it’s been so long I forgot I had submitted this.
My Web hosting company recently moved my site from an old Microsoft IIS server to a Linux server. So the upload script I had been using broke because it assumed the path separator character was always a backslash (used on Windows). I was trying to figure out a simple way to determine when we should convert paths of the Windows files to upload so they used the separator character expected by the server.
I finally took the easy way out and just always assumed the separator character should be a forward slash, and added a line to the PowerShell script that always replaces back slashes with forward slashes. If I ever get moved back to a Windows server, I'll store the server’s expected separator character in the registry & read it when needed. If I live that long…
Sorry for the trouble. If I had remembered this post I would have closed it a long time ago.
Can you be more specific about the problem you are trying to solve?
WinSCP scripting always uses the forward slash – /
– for the remote paths.
Is there an easy way for a script to determine the path separator character used by the remote server (e.g., /
vs. \
)?