-
Notifications
You must be signed in to change notification settings - Fork 30
Sync WinSCPPath
Synchronizes directories.
Sync-WinSCPPath [[-LocalPath] <String>] [[-RemotePath] <String>] [-Criteria <SynchronizationCriteria>]
[-Mirror] -Mode <SynchronizationMode> [-Remove] [-TransferOptions <TransferOptions>] -WinSCPSession <Session>
[<CommonParameters>]
Synchronizes directories.
PS C:\> Sync-WinSCPPath -Mode Local
Uploads : {}
Downloads : {/ftpDoc1.txt, /ftpDoc2.txt}
Removals : {}
Failures : {}
IsSuccess : True
PS C:\> Sync-WinSCPPath -Mode Both -Criteria Time
Uploads : {C:\Users\us165614\Desktop\local\localDoc1.txt, C:\Users\us165614\Desktop\local\localDoc2.txt}
Downloads : {/ftpDoc1.txt, /ftpDoc2.txt}
Removals : {}
Failures : {}
IsSuccess : True
Comparison criteria. Possible values are SynchronizationCriteria.None, SynchronizationCriteria.Time (default), SynchronizationCriteria.Size and SynchronizationCriteria.Either. For SynchronizationMode.Both SynchronizationCriteria.Time can be used only.
Type: SynchronizationCriteria
Parameter Sets: (All)
Aliases:
Accepted values: None, Time, Size, Either
Required: False
Position: Named
Default value: Time
Accept pipeline input: False
Accept wildcard characters: False
Full path to local directory.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
When set to true, synchronizes in mirror mode (synchronizes also older files). Cannot be used for SynchronizationMode.Both. Defaults to false.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Synchronization mode. Possible values are SynchronizationMode.Local, SynchronizationMode.Remote and SynchronizationMode.Both.
Type: SynchronizationMode
Parameter Sets: (All)
Aliases:
Accepted values: Local, Remote, Both
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Full path to remote directory.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
When set to true, deletes obsolete files. Cannot be used for SynchronizationMode.Both.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Transfer options. Defaults to null, what is equivalent to New-WinSCPTransferOption.
Type: TransferOptions
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
It represents a session and provides methods for manipulating remote files over SFTP, SCP or FTP session.
Type: Session
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.