Topic "Setting Ignore Permission Errors in VBS"

Author Message
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 25
Location: MyTown
In a VBS Script I need to set Ignore Permission Errors to True, similar to the attached or dialog below:

Can somebody give me the syntax and the enumerated value? I assume in this case it would just be True or False.
IE:
transferOptions.IgnorePermissionsErrors = True?

Thanks!
Ignore Permissions.jpg (98.57 KB) [Download]

Description: Ignore Permissions Dialog

Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
You have to use a raw configuration option Interface\CopyParam\IgnorePermErrors:
https://winscp.net/eng/docs/rawconfig
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 25
Location: MyTown
Martin,

Thank you again for your help. Do you know the syntax in VB Script? I am going convert current scripts to .wsf...

Thanks so much!


I just tried this: It didn't cause an error, but it didn't update the property / setting:

session.AddRawConfiguration("Interface\CopyParam\IgnorePermErrors") = 1

In the Session Log I am getting this:

Script: put -nopermissions -nopreservetime -transfer="binary"

Thanks!
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Did you see this?
https://winscp.net/eng/docs/rawconfig#example

session.AddRawConfiguration "Interface\CopyParam\IgnorePermErrors", "1"

Note that this has no effect on put command syntax. It changes a global configuration.
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 25
Location: MyTown
Martin,

Thanks again for your help!

When I add the following to my VB Script

session.AddRawConfiguration("Interface\CopyParam\IgnorePermErrors","1")

I get the following error:

Cannot use parenthesis when calling a sub. (800A0414) The syntax has to be structured differently then in the example you provided as it was an example for Powershell.

It goes back to my point of a lack of documentation and examples for coding in VB Script.

When you said to set it globally, it appears that it has to be set as part of the session, and the session gets "disposed" Unless there is someway to execute the Powershell script one time where the configuration setting would stick. In the client it kind of works that way. it is tied to the site profile.

Thanks!
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
OK, so without parenthesis.
session.AddRawConfiguration "Interface\CopyParam\IgnorePermErrors", "1"
Please note that this is not a site to learn a programming in VBScript.
Advertisements

You can post new topics in this forum

Search

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