Topic "Checksum with WinSCP"

Author Message
ask111

Guest


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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.

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

By file size?
_________________
Martin Prikryl
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
An exit code of the script tells you if the download was successful or not.
_________________
Martin Prikryl
RobNC

Guest


prikryl 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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.
_________________
Martin Prikryl
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.
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.
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".
TS

Guest


RobNC: Is this what you're requesting (CRC instead of MD5/SHA1, but same idea)?

https://winscp.net/forum/viewtopic.php?t=4338
RobNC

Guest


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.
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