FTP connect and login using Python ftplib

import ftplib
 
connect = ftplib.FTP("www.mysite.com")
connect.login("domain\user", "password")
data = []
connect.dir(data.append)
connect.quit()
for line in data:
   print(line)

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.