Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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.
msdev7807

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!
martin

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)
msdev7807

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!
martin

Re: Ignore Permissions Error

Did you see this?
https://winscp.net/eng/docs/rawtransfersettings#example
transferOptions.AddRawSettings "Interface\CopyParam\IgnorePermErrors", "1"

Note that this has no effect on put command syntax. It changes a global configuration.
(edited in 2022)
msdev7807

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!
msdev7807

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!