Question

In my script I want to be able, in the end, to be able to download all files in a directory and all sub-directories... So I am trying FTPLIB. I'm trying to call dir of my ftp server and put it into a variable, but I get NONETYPE?! I can connect to the server and when I call directory = session.dir() It displays a kind of matrix style output in the console with files, read/write perms, dates, etc.... But when I then try to print Directory all I seem to get is "None". My initial idea was to for each item in the directory download them to my computer, but I can't seem to get a list of the directory!

directory = session.dir()
print(str(directory))

Sorry for the long and probably trivial explanation, but I have become a little bit too frustrated.

Any help would be very much appreciated!

-Clem

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top