Checksum with WinSCP

Advertisement

ask111
Guest

Checksum with WinSCP

I tried to look in all documentation but could not find this. Can you please heklp.

Is there a checksum kind of mechanism in WinSCP to make sure that the WHOLE file has arrived. Or is there any other way I can be sure if the whole file is transferred. Is it inherent to SFTP ?

How would I know if only partial file is transferred and there was a permanent connection break.

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Checksum with WinSCP

ask111 wrote:

Is there a checksum kind of mechanism in WinSCP to make sure that the WHOLE file has arrived. Or is there any other way I can be sure if the whole file is transferred. Is it inherent to SFTP ?
The latest versions of SFTP protocol includes support for checksum. But there are not many servers supporting this.

How would I know if only partial file is transferred and there was a permanent connection break.
By file size?

Reply with quote

Guest

Thanks for your reply ..

If I am retrieving file using WinSCP with a script at a client location. How would I know what is the file size on server unless I get that information seperately from server.

Reply with quote

RobNC
Guest

... is file compare enabled?

martin wrote:

An exit code of the script tells you if the download was successful or not.

I am just wondering if this is not enabled because WinSCP doesn't know "how" to do the remote file checksum? If it works via rsync over ssh, you'd think it should be possible for this to work, unless perhaps it's because the FTP over SSH doesn't support it?

See in Preferences, Commands, File Compare. There is only a "L" and not "R" (I assume L = local, R = Remote). Anyone know what should be the "R" setting?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: ... is file compare enabled?

RobNC wrote:

I am just wondering if this is not enabled because WinSCP doesn't know "how" to do the remote file checksum? If it works via rsync over ssh, you'd think it should be possible for this to work, unless perhaps it's because the FTP over SSH doesn't support it?
Sorry, I do not know what you talk about. Please try to explain.

Reply with quote

RobNC
Guest

Please go to Preferences, Commands. See Custom Commands.
File Compare is there for Local files, but not for Remote. There needs to be a mechanism (if it is supported, which I assume is the case for SCP but not SFTP) for remote file compare. I.e., like "rsync -vac" which the "c" does checksum compares of files.

Reply with quote

RobNC
Guest

I am sorry for leaving this out, but I am talking about when you are synchronizing two directories with WinSCP. I see that SCP supports CRC but SFTP doesn't. If I login to ssh server with SCP, I don't know how to enable CRC checksum differences (i.e., I don't want to use only the timestamp as the method of file comparison), as rsync can use.

It looks as though this checksum is set up for local use, but I don't know how to enable it for the remote server.

Reply with quote

RobNC
Guest

... should be "I see that SFTP supports it but SCP does not". For me, there are no options when connecting for "enable remote CRC checksum".

Reply with quote

Advertisement

RobNC
Guest

Yes you are right TS

TS: indeed you are correct. I would like to use WinSCP as a replacement for rsync. Since I do rsync over ssh, I was assuming that it would be possible to also do this over SCP. Since WinSCP can establish an SSH connection to the server, why not simply have a remote shell command that can generate the CRC/MD5/SHA1/etc. checksums remotely, and then compare that to the locally-generated copy, during the "synchronize" process.

My problem with rsync is that it does not synchronize bidirectionally. Sometimes I have newer files locally, sometimes remote is newer. And the date alone is not always accurate (i.e., sometimes you just open Excel files and it changes the date even though nothing was changed). For this, the checksum method would save needlessly transferring the file and also changing the date.

There seems to be the capability of adding this to the "R" (versus "L" for local) command-set in my posting below, but perhaps I don't understand the integration of those commands and the synchronization process.

Reply with quote

Advertisement

You can post new topics in this forum