One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
zanotti
8 years agoExplorer | Level 4
Python, get the latest revision of deleted file to restore them
Hi I have a list of 5400 files that have been deleted, I need that files to be restored.
The file list is in csv format and carries the file path but not the revision to restore them.
I need to get the latest revision of all the 5400 files in order to restore them with another script (which I've written using the dropbox python api).
Anyone is able to share a python snippet showing how to return the latest revision of a deleted file using the file name and path?
Regards
- Greg-DB
Dropbox Staff
In the Python SDK, you can use files_list_revisions to get the revisions for the file. There's an example of calling that here.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 35 minutes ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!