Hey Greg,
I've tried to adapt this code in order to get a bunch of files that begin with the letters 'zas', but I found the script just ran for hours without any luck, so I stripped it back to see what was happening.
I define my root and result:
root_path = '/MarketingCreative/External/Bidalgo_Zynga_CSR2/'
result = dbx.files_list_folder(root_path, recursive=True)
And then I'm just printing the file name if its a file, and the folder name if it's a folder:
def process_entries(entries):
for entry in entries:
if isinstance(entry, dropbox.files.FileMetadata):
file = entry.path_display.rsplit('/', 1)[1]
print(file)
else:
print("Folder "+entry.path_display)
process_entries(result.entries)
while result.has_more:
result = dbx.files_list_folder_continue(result.cursor)
process_entries(result.entries)
Again, this is just to see why the script is taking so long with no results.
It seems that after the first few files, the script just keeps repeating the root folder, and not progressing the the subfolders (and files) within (see photos).


If I specific a sub folder in the root path, eg:
root_path = '/MarketingCreative/External/Bidalgo_Zynga_CSR2/C2_112118_2.1_FormulaItalia3_Trailer_VS_AlfaRomeo_[LOC]/'
result = dbx.files_list_folder(root_path, recursive=True)
The script does what I need it to, but at this one level up, it seems to be an infinite loop.
How could I go about debugging this? Is it a cursor issue do you think?
Thanks