Python :raise Error_perm, Resp Ftplib.error_perm: 500?
i'm trying to Copy my file from c:\test to my FTP folder ; This is my code : import ftplib import socket Name = socket.gethostname() filename = Name +'.csv' ftp = ftplib.FTP('xxxxx
Solution 1:
Solved:
import ftplib
import socket
Name = socket.gethostname()
filename = Name +".csv"
ftp = ftplib.FTP('xxxxxxxxxxxxxxxxxx')
ftp.login('xxxxxx','xxxxxxxx')
ftp.cwd('test')
filematch = "C:\\test\\" + Name + ".csv"
filetocopy = open(filematch,'r')
ftp.storlines('STOR ' + filename, filetocopy)
Post a Comment for "Python :raise Error_perm, Resp Ftplib.error_perm: 500?"