Skip to content

New WinSCPTransferOption

Thomas Malkewitz edited this page Sep 14, 2015 · 15 revisions

##Syntax

New-WinSCPTransferOption [-FileMask <String>] [-FilePermissions <FilePermissions>] [-PreserveTimeStamp] [-State <Default | On | Off | Smart>] [-Threshold <Int>] [-SpeedLimit <Int>] [-TransferMode <Binary | Ascii | Automatic>] [ <CommonParameters>]

##Comment Based Help

  • SYNOPSIS

    Sets options for file transfers.

  • DESCRIPTION

    Sets available options for file transfers between the client and server.

  • INPUTS

    None.

  • OUTPUTS

    WinSCP.TransferOptions.

  • PARAMETER FileMask

    http://winscp.net/eng/docs/file_mask

  • PARAMETER FilePermissions

    Permissions to applied to a remote file (used for uploads only).

  • PARAMETER State

    Sets what files will be transferred with resume support/to temporary filename. Use TransferResumeSupportState.Default for built-in default (currently all files above 100 KB), TransferResumeSupportState.On for all files, TransferResumeSupportState.Off for no file (turn off) or TransferResumeSupportState.Smart for all files above threshold (see Threshold).

  • PARAMETER Threshold

    Threshold (in KB) for State.Smart mode.

  • PARAMETER SpeedLimit

    Limit transfer speed (in KB/s).

  • PARAMETER PreserveTimeStamp

    Preserve timestamp (set last write time of destination file to that of source file). Defaults to true.

  • PARAMETER TransferMode

    Possible values are TransferMode.Binary (default), TransferMode.Ascii and TransferMode.Automatic (based on file extension).

  • EXAMPLE

    PS C:\> New-WinSCPTransferOption -PreserveTimeStamp:$false -TransferMode Binary

    PreserveTimestamp : False
    FilePermissions   : 
    TransferMode      : Binary
    FileMask          : 
    ResumeSupport     : default
    SpeedLimit        : 0
  • EXAMPLE
    PS C:\> New-WinSCPTransferOption -FilePermissions (New-WinSCPFilePermissions -GroupExecute -OtherRead)

    PreserveTimestamp : True
    FilePermissions   : 
    TransferMode      : Binary
    FileMask          : 
    ResumeSupport     : default
    SpeedLimit        : 0