Hi,

I am trying to get my python program to download ftp files directly in the program. Connection stuff is done. I managed to download through the command line, but now I want get the same thing done using a python program.

Can anyone help me (all kinds of solutions and suggestions are appreciated =) )?

You can look into paramiko for FTP use. I've used it before and it's VERY straight forward. The documentation provides plenty of examples of usage for connecting to an FTP server and retrieving files.

thanks for the suggestion, i'll try it.

It there anyone who could tell me how to do it directly through python?

i tried to use paramiko, but either i used it incorrectly or it is not a good option for my purposes.

does paramiko allow me to write a program on python that would download ftp stuff from certain sites?

my main issue is to be able to download multiple files at once using ftp. i have managed to do it for one file, but because there are several, it is necessary to write a program to download all files in the directory. (using range is not good, since i don't know the specific count of files there).

Yes paramiko can do that. You mentioned that you can do it from the command line. So why not just use system commands via python?

I.E. os.system, or popen, subprocess, etc. ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.