Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WinSCP.SessionRemoteException error

WinSCP does not work well with non-Unix-like systems unfortunately:
https://winscp.net/tracker/49

There's hardly anything you can do about it.

But we can check anyway. Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
thijsemans

WinSCP.SessionRemoteException error

Hi all,

I am currently trying to create a FTP backup script to download files from an PLC system. However when I am trying to get an overview of the root this first thing I receive is an error like below:

FTP Download Error: WinSCP.SessionRemoteException: Error listing directory 'LIST DISK>D:\'.

It seems like the PLC is returning an root location back to the application that winscp cannot handle. Is there a way to work around this, like not using any feedback or so. Just forcely scan directories and files?

I now use the sessionoptions as below:
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
PortNumber = 21,
HostName = _ftpServer,
UserName = _ftpUser,
Password = _ftpPassword,
FtpMode = FtpMode.Active
};

I first used the synchronization mode, but after that was not working out I tried just to enumerate the directories and files but this was also not working. Strangely enough, the standard windows FTP command is working fine.

Does anyone have experience with this?