Powershell script - Exclude directory

Advertisement

samy
Joined:
Posts:
2
Location:
France

Powershell script - Exclude directory

Hi!
I'm working on a powershell script that sync remote ftp folder from local windows OS.
However, i'm unable to exclude one local folders from sync.
For example, i try to backup C:\test\backup and exclude C:\test\backup\folder

I put those options
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.FileMask = "*.*| folder/"

And run
$session.SynchronizeDirectories($SyncMode, $SourcePath, $DestinationPath, $True, $transferOptions)

Could u tell me what i'm doing wrong?
Thanks.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum