Location: United States
Posted: 2012-07-17 19:43
Greetings. Thanks for all the effort in creating this library!
I'm trying to run a "ls" command against a plain old FTP server and I get an exception:
Syntax error, command unrecognized.
Here's the code:
CommandExecutionResult result = _session.ExecuteCommand("ls");
I must be missing something simple here. Any advice?
I'm using the 5.07 beta of WinSCP and the assembly.
Location: Prague, Czechia
There's no "LS" FTP command.
You probably wanted to use "LIST". But that won't work anyway for numerous reasons. Primary one being that for directory listing with FTP you need to open a separate channel. The listing is not part of a direct response to the LIST command.
Anyway, what's the point? There's Session.ListDirectory command:
You can post new topics in this forum
And it's free!