Post a reply

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)


Topic review


On WinSCP 5.17.7

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

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?