Filezilla directory comparison always shows different file sizes

4

2

I'm developing a web application on a Mac and uploading to a Windows hosted server.
I used to use Filezilla's directory comparison feature to see which files in a directory need to be uploaded to the server. But now, certain files are always shown in red (different).
Worst example: if I upload a brand new file, it is immediately marked as different than itself.

I assume this has something to do with the different ways Windos and Mac OS calculate file sizes - but I only experience this with certain file types: html and text. PHP files (even though they are essentially a text file), binary, images and PDFs all report the correct size.

What is it in html files that gets their size misreported? Should I switch to using modification time as my comparison criteria?

Traveling Tech Guy

Posted 2012-04-17T17:00:27.493

Reputation: 8 743

Answers

7

Set your Default transfer type to Binary and this shouldn't happen again. enter image description here

The problem is that the line endings are converted from UNIX to Windows line terminators. Thus the size difference.

Der Hochstapler

Posted 2012-04-17T17:00:27.493

Reputation: 77 228

So why doesn't the same happen with PHP files, that are essentially text as well? Are there any side effects to selecting Binary transfer over auto? – Traveling Tech Guy – 2012-04-17T17:27:21.143

Good question. Especially since they're also in the list for files to treat as text. Unless you removed the php entry, which would explain the behavior. – Der Hochstapler – 2012-04-17T17:35:25.443

Not removed - PHP appears as ASCII. Still not sure about the Binary transfer - I was taught to use ASC or BIN appropriately in the old command-line FTP days :) – Traveling Tech Guy – 2012-04-17T17:56:34.960

with the php files (a total guess) maybe its about what characters your php editor is using. i.e. If your editor on the mac is actually saving the file with Windows linebreaks "\r\n" but automagically converting them when opening the file... then won't be a difference? (or vice versa) maybe? If you really care open up the php files in something line notepad++ and "view > all characters" to see what's going on with linebreaks. – MemeDeveloper – 2013-01-31T19:22:59.223

I know visual studio often asks me if I want to convert the linebreask for files such as .js so maybe your php editor is doing same without asking. – MemeDeveloper – 2013-01-31T19:23:52.090

0

Divide by 1024 to see if that accounts for the difference. Windows uses 1024 not 1000 to count kB. Discussion here:

https://forum.filezilla-project.org/viewtopic.php?f=1&t=26648

Bobby Z.

Posted 2012-04-17T17:00:27.493

Reputation: 1

1can you explain more? – Sickest – 2014-03-14T17:20:13.330