I am trying to put together a script (Python 2.5, windows xp) that connects to an ftp server and retrieves/uploads files.
I am sure what I have put together is completely insufficient and I get the errors:
Traceback (most recent call last):
? File "C:\Documents and Settings\\Desktop\FTPDownload.py", line 19, in <module>
??? ftp.login('username', 'password')
? File "C:\Python25\lib\ftplib.py", line 373, in login
??? if resp == '3': resp = self.sendcmd('PASS ' + passwd)
? File "C:\Python25\lib\ftplib.py", line 241, in sendcmd
??? return self.getresp()
? File "C:\Python25\lib\ftplib.py", line 216, in getresp
??? raise error_perm, resp
error_perm: 530 User?username cannot log in.
The script I have so far is :
from ftplib import FTP
??? print ".",
ftp = FTP('servername')
# Log in to the server
print 'Logging in.'
# Specify username and password
directory = '/test/ftp/'
# Change to that directory.?
print 'Changing to ' + directory
# Print the contents of the directory
but i cannot even connect to the FTP not to mention upload/download anything...So any ideas or suggestions would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...