Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Download a folder from box using Terminal Command Line

New post

Comments

1 comment

  • jcleblanc

    Hi ,

     

    Let me see if I can provide some context:

     

    How to download all the files in a directory from the above command?

    As you've seen in your second call, the /items endpoint will provide you with a list of the files and folders within a given folder ID. To keep this on the terminal you can write a small bash script that will pull in the items, look through each, and then make a request to get each of the files (your first call).

     

    How to make sure it's complete?

    You can use the limit parameter, shown in the API reference, to increase the number of results returned. If you have too many results to return in these instances then you'll have to page through the results (under "related guides" here). In essence you'll download a chunk of the file list, then use a marker (where you left off in the list) to make a second call (and third, etc.) to get the next chunk of results, until it's complete.

     

    Hope that helps,

    Jon

    0
    Comment actions Permalink

Please sign in to leave a comment.