Skip to content

Instantly share code, notes, and snippets.

@manthey
Created March 9, 2022 18:11
Show Gist options
  • Save manthey/4399d9e282746141cf43b2d3ed1d7c11 to your computer and use it in GitHub Desktop.
Save manthey/4399d9e282746141cf43b2d3ed1d7c11 to your computer and use it in GitHub Desktop.
folder recursion
topFolder = Folder().load(id=<id>, force=True)
allFolders = [topFolder]
idx = 0
while idx < len(allFolders):
allFolders.extend(list(Folder().childFolders(allFolders[idx], 'folder', force=True))
idx += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment