I solved it my self.
I am sorry, I mixed up local and remote directory.
BR
Matthias
I am sorry, I mixed up local and remote directory.
BR
Matthias
$session = New-Object WinSCP.Session
$session.SessionLogPath = ".\SessionLogFile.log"
$session.Open($sessionOptions)
$session.SynchronizeDirectories([WinSCP.SynchronizationMode]::Local, "/storage/hd0b/wm/config_backup", ".\config_backup", $True, $True)
Uploads : {}
Downloads : {}
Removals : {}
Failures : {WinSCP.SessionRemoteException: Error listing directory '/storage/hd0b/wm/config_backup'. ---> WinSCP.Sessi
onRemoteException: Error retrieving file list for "/storage/hd0b/wm/config_backup\*.*".
System Error. Code: 3.
Das System kann den angegebenen Pfad nicht finden
--- Ende der internen Ausnahmestapelüberwachung ---, WinSCP.SessionRemoteException: Error listing direct
ory '/storage/hd0b/wm/config_backup'. ---> WinSCP.SessionRemoteException: Error retrieving file list for "/
storage/hd0b/wm/config_backup\*.*".
System Error. Code: 3.
Das System kann den angegebenen Pfad nicht finden
--- Ende der internen Ausnahmestapelüberwachung ---}
IsSuccess : False
$session.ListDirectory("/storage/hd0b/wm/config_backup")
Files
-----
{config_20140515_2030.tar.gz, config_20140904_2030.tar.gz, config_20140626_2030.tar.gz, config_20141106_2030.tar.gz...}