import ftplib
server = '192.168.1.109'
user = 'bob'
password = 'likes_sandwiches'
box = ftplib.FTP(server)
box.login(user, password)
s = box.mkd('\\a\\this4\\')
box.close()
x = raw_input('done, eat sandwiches now')
This returns:
Traceback (last last call): File "C: \ scripts \ ftp_test.py", line 25, in s = box.mkd ('\ E \ this4 \') File "C: \ Python26 \ lib \ ftplib.py" , line 553, in mkd return parse257 (resp) File "C: \ Python26 \ lib \ ftplib.py", line 651, in parse257 raise error_reply, resp error_reply: 250 directory was created successfully.
He successfully created the directory, but he considers his mistake! WTF?
I plan to create many directories in a loop, how can I do this without interrupting it every time it successfully creates one directory?
source
share