Error during creating a directory on a SFTP Server

Advertisement

oklatt
Joined:
Posts:
1
Location:
Deutschland

Error during creating a directory on a SFTP Server

Hello,

I have to create a directory on a SFTP Server. I use the .net assemby 5.0.7.

Dim ComResult As WinSCP.CommandExecutionResult
try
 comResult = session.ExecuteCommand("MKDIR " & strRemoteDir & strDirZeitstempel)
catch ex as Exception
End Try

I get this error message:

{WinSCP.SessionLocalException: Element "call" not found in the log file" & vbCrLf & " bei WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)" & vbCrLf & " bei WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(String localName, LogReadFlags flags)" & vbCrLf & " bei WinSCP.Session.ExecuteCommand(String command)" & vbCrLf & " bei Export.ExportFiles() in C:\_.NET\x.vb:Zeile 146.}

Is there any way to create a directory on a SFTP Server with .net?

Thanks

Olaf :D

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,316
Location:
Prague, Czechia

Re: Error during creating a directory on a SFTP Server

See remarks section on Session.ExecuteCommand article to understand why you possibly cannot use it.
https://winscp.net/eng/docs/library_session_executecommand#remarks

Also check session log file (or attach it here).

This bug is a cause, why you are getting the strange error message:
https://winscp.net/tracker/871
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum