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: ExecuteCommand throws error with ls /+mode=text

An equivalent of ls command is Session.ListDirectory:
https://winscp.net/eng/docs/scriptcommand_ls#net

Like:
session.ListDirectory("/+mode=text,clientcp=ISO8859-1,servercp=IBM-1047");
mgraham

ExecuteCommand throws error with ls /+mode=text

I am trying to download files in text format from a mainframe. When working interactively in the winscp terminal window I can issue the command: "ls /+mode=text,clientcp=ISO8859-1,servercp=IBM-1047", but that same command does not work when executed via ExecuteCommand. The issue I have is that setting the TransferMode to Ascii does not change the transfer mode via the .NET library, and trying to issue the command directly with ExecuteCommand doesn't work either. Is there a way to change the mainframe transfer mode within the .NET framework or via the ExecuteCommand?