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

Dan Curious

Martin,

I did not know about this option. I mean, I've seen references to wsf files, but always glossed over it.

Wow. We can use jscript functions inside a vbscript module.

Perfect. Thanks for filling in one of my gaps.
martin

As the article says, you need to rename your script to .wsf.
Dan Curious

How do you use the reference tag, outside of an xml/html context? My script is being run standalone. It's a desktop automation, a .vbs script.

If I try to run the vbscript with a reference or job tag, before or after Option Explicit, the interpreter complains that it's invalid. Specifically, "Expected statement".

I guess the real question is, what are the constants for Binary and Ascii? Is it 0 and 1, respectively? I can just create constants for those inside the script, or use the values directly.
Dan Curious

What's the value of

Hi,

In the VBScript example:
https://winscp.net/eng/docs/library_com_wsh#vbscript
they use a binary transfer mode, and it's represented as a variable TransferMode_Binary. I need to use the Ascii version.

But in either case, I don't understand where the value of TransferMode_Binary or TransferMode_Ascii is found. TransferMode itself is a property of TransferOptions, understood. But I don't see how we get that Binary or Ascii property of TransferMode, and assign it to oTransferOptions.TransferMode.

Is TransferMode_Binary = 1, and TransferMode_Ascii = 2?