Topic "Help setting $transferOptions.FilePermissions in powershell"

Author Message
notbroken
[View user's profile]

Joined: 2015-02-25
Posts: 2
Powershell

I need to set the file permissions to Octal 666.

$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.FilePermissions = ?

I am new to powershell and am trying to work through this "Create new instance of FilePermissions and set FilePermissions.Octal to a value of the switch."

Any help/guidance would be appreciated
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Use:
Code:
$transferOptions.FilePermissions = New-Object WinSCP.FilePermissions
$transferOptions.FilePermissions.Octal = "666"
notbroken
[View user's profile]

Joined: 2015-02-25
Posts: 2
prikryl wrote:
Ue:
Code:
$transferOptions.FilePermissions = New-Object WinSCP.FilePermissions
$transferOptions.FilePermissions.Octal = "666"



Worked perfectly. Thank you
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License