Skip to main content
Question

Get list of folders and files as fast as possible.

  • May 22, 2025
  • 1 reply
  • 12 views

Forum|alt.badge.img

Hello,

Using the Java API, I am trying to get as fast as possible the list of items under a given folder. I also need the size and mtime of each file.
As example, I found the class BoxFolderTreeBuilder in https://developer.box.com/guides/folders/bulk/build-folder-tree/

My question: is there another way to do that in order get better speed performance?

For my tests I used a tree of 46 folders/ 198 files.
The BoxFolderTreeBuilder program takes 20 seconds to get the result,
if I add code to also retrieve size and mtime of each file, it takes 1mn40s.
This has to be compared with what I get with some other "cloud fs".

1 reply

Forum|alt.badge.img

Hi Klein,

Did you ever figure this out? I want to do a similar thing, namely, how can I get a CSV of filenames and associated box file ids for ALL files within a folder or its subfolders?

Thank you!

Best,

Dan