Topic "File size is displayed differently in local and remote panel"

Author Message
Anton P.
[View user's profile]

Joined: 2005-08-12
Posts: 29
Hi Martin,

It seems to me that a file's size is displayed differently in the local and remote panels. In the remote panel, it is displayed (in the Size column) in kilobytes (eg 47,475) whereas in the local panel it appears to be displayed in bytes (48,540)---and if you view the local file's properties, it says "47.4 KB (48,540 bytes)"

This is very confusing, and I am often tricked into thinking that the file versions are different when in fact the time stamp shows them to be the same.

Could you change this so that both panels display size in the same format?

Cheers then,
Anton
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Well, I would say that the difference is caused by text/ascii mode transfer. And by coincidence the size change seem to be in ratio 1000/1024. Isn't it?
_________________
Martin Prikryl
Anton P.
[View user's profile]

Joined: 2005-08-12
Posts: 29
Yes, it does seem to depend on something like that.

Files whose size is displayed the same in local and remote panels:

.bib; .aux; .bak; .log;

yet the size of a .tex file is displayed differently in each panel. (All these file extensions correspond to the typesetting system LaTeX.)

Now .tex files certainly are ASCII text, but I don't think WinSCP knows that---they don't appear in the "Transfer the following in text mode" mask.

As you say, the size change is definitely in the right ratio to be able to say that a file size is written in bytes on one panel and kilobytes in the other.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Anton P. wrote:
Now .tex files certainly are ASCII text, but I don't think WinSCP knows that---they don't appear in the "Transfer the following in text mode" mask.

The *.tex mask is part of the default value of "Transfer the following in text mode":
Quote:
*.*html; *.htm; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml

Are you sure you do not have it there?
_________________
Martin Prikryl
Anton P.
[View user's profile]

Joined: 2005-08-12
Posts: 29
Apologies, the .tex mask is indeed there, I just foolishly missed it somehow (and I double-checked, too) Embarassed

So the problem does seem to lie in the remote panel: if WinSCP thinks that a remote file is ASCII text it displays its size in kilobytes, whereas if it thinks that a remote file is binary it displays its size in bytes. Perhaps you would consider displaying everything in bytes?

Best wishes,
Anton
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Anton P. wrote:
So the problem does seem to lie in the remote panel: if WinSCP thinks that a remote file is ASCII text it displays its size in kilobytes, whereas if it thinks that a remote file is binary it displays its size in bytes. Perhaps you would consider displaying everything in bytes?

It is misunderstanding. Remote file panel assumes nothing. It displays actual file size. It is just that you have either downloaded or uploaded the file in ASCII/text mode, so the file size is actually different in load and remote directory.

Note that the file size in remote panel is NOT in kilobytes. It is just coincidence that the ratio between file size in Windows text file format and Unix text file format for your file is approximatelly 1024/1000.

If you haven't done already, read documentation for transfer modes. Maybe it will make it clear (alhought your issue is not covered there directly).
_________________
Martin Prikryl
Anton P.
[View user's profile]

Joined: 2005-08-12
Posts: 29
You're right of course! I was misled by the coincidental ratio of Windows text size to UNIX text size. The mystery is solved Idea
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