FTP anomaly

K

Kyle Odom

I'm trying to automate some things at work and something I do a lot if
FTP some files back and forth. I've got this all done in python just
fine, but I noticed a huge difference in file sizes. One particular
binary file comes over at roughly two megs when I transfer it via ftp
from the command line (running XP.) When I get it via my python
script, it's nine megs! Any clue why? I haven't tried using the file
in my work because I don't want to break anything.
Fairly new to Python, be kind to me :)
Thanks!
KO
 
S

Steve Holden

Kyle said:
I'm trying to automate some things at work and something I do a lot if
FTP some files back and forth. I've got this all done in python just
fine, but I noticed a huge difference in file sizes. One particular
binary file comes over at roughly two megs when I transfer it via ftp
from the command line (running XP.) When I get it via my python
script, it's nine megs! Any clue why? I haven't tried using the file
in my work because I don't want to break anything.
Fairly new to Python, be kind to me :)
Thanks!
KO

You will possibly find that when you transfer the file using the command
line it's being truncated because you didn't set binary mode, and that
Python is giving you ALL the data.

Just a theory. Otherwise I'd need to see some code ...

Obviously it would also be helpful to check the file sizes the server
reports in a DIR command and see whether either transfer method conforms.

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,209
Messages
2,571,089
Members
47,687
Latest member
IngridXxj

Latest Threads

Top