i have found a solution
ok, this is my solution. :lol:
' Run hidden WinSCP process
Dim winscp As Process = New Process()
winscp.StartInfo.FileName = "winscp.com"
winscp.StartInfo.Arguments = "/command ""option batch on"" ""Option Confirm Off"" ""open " & user & ":" & pw & "@" & adress & """" & remoteDir & " ""Option transfer binary"" ""Get " & remotePattern & " " & localDir & "*"" ""close"" ""exit"""
winscp.StartInfo.UseShellExecute = False
winscp.StartInfo.RedirectStandardInput = True
winscp.StartInfo.RedirectStandardOutput = True
winscp.StartInfo.CreateNoWindow = True
winscp.Start()
' Wait until WinSCP finishes
winscp.WaitForExit()
'Falls Anmeldungsfehler (z.b. Host nicht gefunden oder Passwort nicht korrekt)
If winscp.ExitCode <> 0 Then
' Collect all output (not used in this example)
'Hier werden die Erfolgs oder Errormeldungen ausgegeben.
Dim errorOutput As String = winscp.StandardOutput.ReadToEnd()
usefulFunctions.logMessage(errorOutput, "ERROR", "downloader.SFTP")
Return False
End If