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?
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?