Hi
Can anyone give me an idea how to solve this?
I get the following error when i syncronize to or from my ftp with a powershell script, build on the template.
"The argument is null or empty. Provide an argument that is not null or empty, and then try the command again."
It looks like it is when there is no files to syncronize, but should: $synchronizationResult.IsSuccess be $false if there is no files that have been syncronized?
I am using the $synchronizationResult to move or removed syncronized files.
Can anyone tell me if there is any other trick to test if the $synchronizationResult is empty?
try
{
$session.Open($sessionOptions)
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.FileMask = "|*/"
$transferOptions.OverwriteMode = [WinSCP.OverwriteMode]::Overwrite
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$synchronizationResult = $session.SynchronizeDirectories(
[WinSCP.SynchronizationMode]::Local, $localPath, $remotePath, $False, $False, [WinSCP.SynchronizationCriteria]::None, $transferOptions)
if ($synchronizationResult.IsSuccess -eq $true)
{
foreach ($download in $synchronizationResult.Downloads)
{
Thanks on advance
/Graves