Topic "Setting transferOptions.TransferResumeSupport in VB Script (VBS)"

Author Message
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 8
Location: MyTown
We are uploading files to a FTP site via SFTP.
I need to set the TransferOptions.TransferResumeSupport So it doesn't break the file into the *.filepart segments.

Does anyone know the proper syntax to set the properties in VBS (VB Script)(below is what I attempted but the syntax isn't correct)?


Set transferOptions = WScript.CreateObject("WinSCP.TransferOptions")
transferOptions.TransferMode = TransferMode_Binary
transferOptions.TransferResumeSupport.State = TransferResumeSupport.TransferResumeSupportState.Off


Any help would be very much appreciated.

Thanks!
Advertisements
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 8
Location: MyTown
This is basically what I need to set in VB Script:

See attached image. Indicate Disable in the first section Under Endurance Settings....
WinSCPEnduranceOptions.jpg (50.53 KB)

Description: (none)

WinSCPEnduranceOptions.jpg

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26705
Location: Prague, Czechia
It should be:
transferOptions.TransferResumeSupport.State = TransferResumeSupportState_Off

See https://winscp.net/eng/docs/library_com_wsh#enums

Basically the same syntax you are already using for the TransferMode.
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 8
Location: MyTown
Thank you for the reply. I entered the code in the same block as setting the transfermode, etc after creating the Transfer Options Object.

transferOptions.TransferResumeSupport.State = TransferResumeSupportState_Off

And I am receiving the following error (any ideas): Thanks!
TransferOptionError.jpg (11.33 KB)

Description: (none)

TransferOptionError.jpg

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26705
Location: Prague, Czechia
Because it's TransferOptions.ResumeSupport[m], not [m]TransferOptions.TransferResumeSupport.

See https://winscp.net/eng/docs/library_transferoptions
msdev7807
[View user's profile]

Joined: 2017-03-14
Posts: 8
Location: MyTown
Thanks for the reply...

The syntax didn't generate an error, however, it still didn't resolve my problem. I am still getting the .filepart files created and the file transfer is not completing properly. Just a additional piece of information, the host has only granted execute and write security on the folder we are uploading to. I believe this is why WinSCP is not able to reassemble the .filepart extensions back to the original file, because there is no read access to the folder on the host (which I am not sure why they do this, except for multiple clients upload to the same folder??)..

As in the previous thread, I attached the screen shot of the settings we need that work correctly when transferring the file via the WinSCP Client UI. Again just need to know how to accomplish the same functionality when scripting through VB Script.

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