cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export Folders & Filename List

Export Folders & Filename List

samanderson
Explorer | Level 3

Hey there! I'm looking for a method to generate a TXT file containing the contents of a publicly shared folder, including both files and subfolders, along with their respective filenames and modification dates. I first attempted to create a script with ChatGPT's help, but couldn't get it to work. Then, I tried using the andreafabrizi/Dropbox-Uploader BASH script, but encountered various issues when trying to run it.

1 Accepted Solution

Accepted Solutions

Hi @samanderson,

Following your desire, you can do it in 2 nested steps. First you need to enlist all shared links using /2/sharing/list_shared_links and next in recursive way list all nested folders to for all links to shared folders using /2/files/list_folder/continue while keep in mind that the recursion must be organized by you - embedded recursion for links is not supported. Now, you should have links for all files that have (directly or indirectly) pointing shared links and their names as well. For further metadata (modification time and so on) you may call /2/sharing/get_shared_link_metadata for every file link got from the first step. Be aware of different modification dates - client side and server side - you likely need client side.

The above endpoints can be accessed using any network tool (like curl, for instance) or programing language (either supported by Dropbox or not) able to perform HTTP request (i.e. all in fact). The choice is yours, but I would suggest using Python with the Dropbox Python SDK. 😉

One more suggestion (or maybe joke): don't rely on AI (they are no so intelligent yet), but rather on your own intelligence! 😀

Hope this gives direction.

View solution in original post

1 Reply 1

Hi @samanderson,

Following your desire, you can do it in 2 nested steps. First you need to enlist all shared links using /2/sharing/list_shared_links and next in recursive way list all nested folders to for all links to shared folders using /2/files/list_folder/continue while keep in mind that the recursion must be organized by you - embedded recursion for links is not supported. Now, you should have links for all files that have (directly or indirectly) pointing shared links and their names as well. For further metadata (modification time and so on) you may call /2/sharing/get_shared_link_metadata for every file link got from the first step. Be aware of different modification dates - client side and server side - you likely need client side.

The above endpoints can be accessed using any network tool (like curl, for instance) or programing language (either supported by Dropbox or not) able to perform HTTP request (i.e. all in fact). The choice is yours, but I would suggest using Python with the Dropbox Python SDK. 😉

One more suggestion (or maybe joke): don't rely on AI (they are no so intelligent yet), but rather on your own intelligence! 😀

Hope this gives direction.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?