SessionRemoteException and remote directories

Advertisement

jb@mtrade.com
Joined:
Posts:
2

SessionRemoteException and remote directories

I am attempting to automate connectivity to a remote SFTP Server using WinSCP within Powershell. The SFTP Server admins do not want to create a local directory. So, I get a SessionRemoteException with the error below when I attempt a $session.Open. I attempted to catch the exception so I could proceed to a full-path directory provided by the SFTP Server admins, but the $session object is null.

Cannot get real path for '.'.
No such file or directory.
Error code: 2
Error message from server (en): No such file

Is there a way to ignore this exception or specify an alternative remote directory?

Reply with quote

Advertisement

jb@mtrade.com
Joined:
Posts:
2

Re: SessionRemoteException and remote directories

martin wrote:

So why don't the admins set the home folder to some existing directory?

Thanks for the reply. The explanation made no sense. They cited no issues with the CoreFTP client with a missing home directory and reasoned that it was something I need to change.

Fortunately, after whining, the remote admins have responded to my appeal and created a "home" directory.

Reply with quote

Advertisement

You can post new topics in this forum