Skip to content

Files from multiple folders #6

Open

Description

@cgriffith12

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?

Activity

  1. orasik commented on Jan 13, 2020

    @orasik
    Owner

    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.

  2. bhouy commented on Jan 29, 2020

    @bhouy

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions