Re: Powershell winscp filepermissions
As shown above, this is the correct code:
Alternatively, like this:
You can have the latter code generated by WinSCP GUI:
https://winscp.net/eng/docs/ui_generateurl#code
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.FilePermissions = New-Object WinSCP.FilePermissions
$transferOptions.FilePermissions.Octal = "0775"
Alternatively, like this:
$transferOptions = New-Object WinSCP.TransferOptions -Property @{
TransferMode = [WinSCP.TransferMode]::Binary
FilePermissions = New-Object WinSCP.FilePermissions -Property @{ Octal = "0775" }
}
You can have the latter code generated by WinSCP GUI:
https://winscp.net/eng/docs/ui_generateurl#code