Topic "compare file size between windows and unix"

Author Message
Freitag
[View user's profile]

Joined: 2007-10-25
Posts: 51
When you copy a file from Windows to unix and the file already exists on unix, you are prompted if you want to replace the file.

File attributes are shown including the file size. The windows size includes both CR and LF, but the unix size only has the one. So it gives the appearance that the windows file is larger (sometimes by quite a large amount)

Would parsing the file to count the characters that would actually be transmitted take too long?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
That's not a bad idea. However it has some drawbacks:

You do not know if the remote file has indeed Unix line endings. But it is actualy not a problem if the size you show with the local file is to indicate actual size after upload.

With FTP protocol and SFTP protocol version 4 and newer, it is actually the remote server that does the conversion and it does it in its own way (unknown to WinSCP), so WinSCP should not anticipate the results.
_________________
Martin Prikryl
Guest




Would it be an idea to show also a "unix file size" for the local file (pherhaps as configurable option which is off by default)? Most people know if the server is a unix server and it would help them to know if file has changed or not.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Anonymous wrote:
Would it be an idea to show also a "unix file size" for the local file (pherhaps as configurable option which is off by default)? Most people know if the server is a unix server and it would help them to know if file has changed or not.

In file panel?
_________________
Martin Prikryl
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