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 (most recent call last): 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 created successfully.
It successfully created a directory, but it thinks its an error! WTF?
I plan on creating many directories in a loop, how can I do this without having it break every time it successfully creates a single directory?