Did you do $ftp->binary()? | [reply] [d/l] |
No. it's in Ascii format and stream mode.
Do you think this could be the problem ??
Thanx
| [reply] |
I did changed to binary. Now it's been working and I'm getting the correct file size. But my question is, when I'm FTP'ing to the same OS remote server (HP) and the file is an ascii type, is there any kind of impact ???
thanx
| [reply] |
Glad it's working for you now. What you need to understand about ascii type is that it changes all line ends to carriage-return-line-feeds when they go "over the wire" from one machine to the other. Even if the two machines have the same end of line conventions, your file gets chewed on twice (once converting to CRLFs, and again when converting back), and in some cases that might leave some tooth marks. Some ftp clients will detect that situation and automatically switch to binary mode... others won't.
| [reply] |
Some filesystems can affect the size of a file. (HFS comes to mind.) It could be file system overhead.
TGI says moo
| [reply] |
Is there a way to handle this ???
All I need is to check weather the file that was transferred was succesful (there are cases where the file transferred was not complete), otherwise we need to run the script again and that's a real pain for me. And we don't have the delete permissions on the remote server.
The same command (size $rem_file) works fine at FTP prompt.
Please advice me to get the file size on the remote server.
Thanx
| [reply] |
$lines_in_file + $size_of_smaller_file == $lines_in_larger_file
| [reply] [d/l] |