FilePermissiosn in VBScript

Advertisement

bmcnish@...
Guest

FilePermissiosn in VBScript

How can I set the FilePermissions in a VBScript ? I have tried:

Dim myPermissions
Set myPermissions = Wscript.CreateObject("WinSCP.FilePermissions")
myPermissions.FilePermissions.Text = "rwxrwxrwx"

also tried:

Set transferOptions = WScript.CreateObject("WinSCP.TransferOptions")
transferOptions.TransferMode = TransferMode_Binary
transferOptions.FilePermissions.Text = "rwxrwxrwx"

Both returns "missing object"

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: FilePermissiosn in VBScript

I do not do VBScript, but I guess this should do:

Set transferOptions = WScript.CreateObject("WinSCP.TransferOptions")
transferOptions.FilePermissions = Wscript.CreateObject("WinSCP.FilePermissions")
transferOptions.FilePermissions.Text = "rwxrwxrwx"

Reply with quote

Advertisement

You can post new topics in this forum