Topic "Disable ResumeSupport when using .NET assembly in Powershell"

Author Message
meggenberger
[View user's profile]

Joined: 2012-06-26
Posts: 1
Hi there.

I'm using WinSCP 5.0.7 from the Powershell. My script does various uploads/downloads renames etc. I encounter a problem when uploading files that some fail when it's trying to rename the file.filepart to the original name. When I use the GUI and I disable Preferences - Transfer - Endurance - Enable Transfer resume/transfer to temporary filename for
it works. As soon as I enable it most uploads fail. When I wait a bit (2-3 seconds) and then try a rename it works. I assume something on the SFTP server is preventing it from renaming it directly after the upload. Maybe a processing / scanning that locks the file for a short period of time. The SFTP server is out of my control so I tried to set the ResumeSupport Option also when using the .NET assembly with adding the following to my SessionOptions Object before opening the session:

...
$sessionOption.AddRawSettings("ResumeSupport","2")
...

But it's still creating xxx.filepart files first.

What am I doing wrong here to disable ResumeSupport? And when will Session.MoveFile be available? It says next release ... when would that be?

Regards,
Marc
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
meggenberger wrote:
$sessionOption.AddRawSettings("ResumeSupport","2")

ResumeSupport is not a session option, it is an global configuration option that cannot be set in NET assembly yet.

All you can do atm is to configure it in the GUI and unset Session.DefaultConfiguration
https://winscp.net/eng/docs/library_session

This request has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=876
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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