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

lgmsampaio

On WinSCP 5.17.7

var transferOptions = new TransferOptions();
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off;
 
session.PutFiles(
    fullPath + "*.csv", _appSettings.RemoteFolder,
    transferOptions: transferOptions).Check();
cspitzer

Turning off partial uploading in C#

I'm using the C# library, and have gotten the error
15:57:17: Error: WinSCP.SessionRemoteException: Transfer was successfully finished, but temporary transfer file '122612_Eligibility_TEST_20140410.txt.pgp.filepart' could not be renamed to target file name 'InputFile_TEST_20140410.txt.pgp'. If the problem persists, you may try to turn off transfer resume support. ---> WinSCP.SessionRemoteException: No such file or directory.
Error code: 2
Error message from server (en): File not found

i previously got an error when it was tryting to set the timestamp, but turning that off with
transferOptions.PreserveTimestamp = false;

turned off that error. However, there doesn't appear to be a way to turn off the partial uploading capability using anything in the TransferOptions class. Is there a way to do so? The site I am uploading to moves files once they exist, so they have to be entire and correct when the transfer is complete.
Btw: the file is >100kb in size. When I use WinSCP there is a preference to turn on this if the file is >100kb. Does this preference hold for using the .NET library, and if so, is there a way to get this preference disabled?