aws_lambda_ftp_function icon indicating copy to clipboard operation
aws_lambda_ftp_function copied to clipboard

Files from multiple folders

Open cgriffith12 opened this issue 5 years ago • 2 comments

Thank you for the Lambda script. I am using the script to connect a FTP server and pull all the files into a S3 bucket, except all the files I need are in multiple folders so I keep getting errors downloading the files. the script tries to download the files and errors out because all the files I need are in folders in the remote path Is there a way to pull files from multiple folders?

cgriffith12 avatar Jan 10 '20 20:01 cgriffith12

you should be able to retrieve all folders if you add else for if statement at

        if not is_ftp_folder(ftp, file):

this will require rewriting the handler to be a function so it can be re-used in the else statement.

orasik avatar Jan 13 '20 14:01 orasik

Hello Orasik, This is really good stuff! I am looking for the exact same things as cgriffith12. I apologize but I am new to python and can't seem to get this to work. Can you please show in detail how to add an else for if statement to your existing script? I also don't know what you mean by 'rewriting the handler to be a function'.

Any assistance would be greatly appreciated. Thanks mate!

bhouy avatar Jan 29 '20 19:01 bhouy