Setting Ignore Permission Errors in VBS

Advertisement

msdev7807
Joined:
Posts:
31
Location:
MyTown

Setting Ignore Permission Errors in VBS

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!

Description: Ignore Permissions Dialog

Ignore Permissions.jpg

Reply with quote

Advertisement

msdev7807
Joined:
Posts:
31
Location:
MyTown

Ignore Permissions Error

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:
transferOptions.AddRawSettings("IgnorePermErrors") = 1
(edited in 2022 by admin)
In the Session Log I am getting this:
. Script: put  -nopermissions -nopreservetime -transfer="binary" 
Thanks!

Reply with quote

msdev7807
Joined:
Posts:
31
Location:
MyTown

Ignore Permission Errors

Martin,

Thanks again for your help!

When I add the following to my VB Script
transferOptions.AddRawSettings("IgnorePermErrors","1")
(edited in 2022)
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!

Reply with quote

Advertisement

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

Re: Ignore Permission Errors

OK, so without parenthesis.
transferOptions.AddRawSettings "Interface\CopyParam\IgnorePermErrors", "1"
Please note that this is not a site to learn a programming in VBScript.
(edited in 2022)

Reply with quote

msdev7807
Joined:
Posts:
31
Location:
MyTown

Re: Ignore Permission Errors

Thanks again Martin,

I hear what you are saying, but this was a question directly regarding the structure of a WinSCP specific syntax for VB Script. It wasn't a question of something that was native to VB Script, (a good possibility if it were, I would have been able to find examples via Google searches). I am sure as a programmer / developer, when you Google syntax in most programming or script development languages you usually get documentation with lots of examples(depending on the popularity of the scripting / development language), or threads on forums, as well as other online resources. For example, if I were using PowerShell, there was a specific example of the function call syntax. I suppose I could have spent some time in doing some trial and error to derive the proper syntax i.e. tried without parenthesis.

Having said that, I really appreciate you going the extra mile. I hope I am done with these kind of obscure questions. Thanks again for all of your help. You are truly a MVP as far as support and help for WinSCP!

Reply with quote

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

Re: Ignore Permission Errors

I hear what you are saying, but this was a question directly regarding the structure of a WinSCP specific syntax for VB Script. It wasn't a question of something that was native to VB Script
Calling a "sub" (a function with no return value) in VB/VBScript is always without parenthesis. It's not anything WinSCP-specific.

Reply with quote

Advertisement

You can post new topics in this forum