FTP program works -- now how do I send the directory over?
Kemp Randy-W18971
Randy.L.Kemp at motorola.com
Tue Jul 3 13:04:52 EDT 2001
The following FTP program now works, in connecting on my windows machine to my Unix server. What statements need I add to ftp the directory files in d:\programsPerl to /usr2/ecadtesting/tarbackups/?
import string, os
import ftplib
from ftplib import FTP
print string.join(os.listdir('d:\programsPerl'),',')
ftp = FTP('144.144.144.144') #specify host
ftp.connect # defaults to port 21, check docs for further options
ftp.login(user='elmer',passwd='fudd',acct='donald') # user info
ftp.cwd('/usr2/ecadtesting/tarbackups/')
ftp.retrlines('LIST') # list directory contents
ftp.quit()
More information about the Python-list
mailing list