Topic "SessionRemoteException and remote directories"

Author Message
jb@mtrade.com
[View user's profile]

Joined: 2017-06-14
Posts: 2
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
So why don't the admins set the home folder to some existing directory?
jb@mtrade.com
[View user's profile]

Joined: 2017-06-14
Posts: 2
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.
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License