ResumeSupport.State does not seem to work.

Advertisement

icedteax
Joined:
Posts:
2

ResumeSupport.State does not seem to work.

Hi, I'm uploading files on a sftp server using:
TransferOptions.ResumeSupport.State = TransferResumeSupportState.Off

After the upload, I try to compare the file size of the local / remote files to be sure everythings are right but when I list the files they have a stamp like this :
MyFile_186804232.txt instead of MyFile.txt. So I'm unable to match them correctly.

If I wait couple of seconds and I list the files again, they are named correctly.

I don't know what I'm doing wrong. Do you have an Idea?
The version is : 5.7.2

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,760
Location:
Prague, Czechia

Re: ResumeSupport.State does not seem to work.

It's not WinSCP that's adding the numbers to the file name. It has to be the server or some server-side process.

Reply with quote

icedteax
Joined:
Posts:
2

Re: ResumeSupport.State does not seem to work.

So is it the way I do it that is wrong?
When I want to upload files I do this:

Connect

Set TransferOptions
For each file
transferResult = PutFiles(....)
transferResult.Check
Next

-- I do not disconnect yet

-- In another function i do this

ListFiles
-- I verify I the listed files and sizes are the same as the local files I wanted to upload
-- If one or some files are not transferred correctly I create an Exception.

-- After I Disconnect Into my Upload function

My Question is: Am I ok to only use the transferResult.Check to be sure my upload is fine?

Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,760
Location:
Prague, Czechia

Re: ResumeSupport.State does not seem to work.

icedteax wrote:

So is it the way I do it that is wrong?
No. You are doing it right.

My Question is: Am I ok to only use the transferResult.Check to be sure my upload is fine?
Correct.

Reply with quote

Advertisement

You can post new topics in this forum