I need to write a python script that traverses a folder on a FTP server.
for file in ftpfolder:
#get it
#do something untoward with it
Snippets and non-wheel-reinvention advice welcome.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ftputil is the third-party module you’re looking for:
Note for example the snippet here:
ftputilis pure Python, very stable, and very popular onpypi(users rate it 9, which I think is the maximum on pypi’s scale). What’s not to like?-)