One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
PeterG-TDA
4 years agoNew member | Level 2
Compute content_hash of local folder
Hi, I've implemented content hashing for local files using the instructions found here dropbox content-hash page - very helpful article!
Next I'd like to implement content hashing for folders locally. So I can then compare to a remove Dropbox folder's content_hash (and download or not download a folder accordingly).
What is the best way to generate a content_hash for a folder locally?
- Hash individual files (in the folder) one at a time and then hash the concatenated SHA-256 strings? If so, what would be the order of the files to hash sequentially?
- Can the folder be hashed (rather than each file)? This would be far more efficient!
- Can detailed instructions please be provided?
Thank you very much.
Peter
Dropbox doesn't offer a 'content_hash' or equivalent for entire folders, only files, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
If you want to verify an entire folder, you'd need to check each individual file in the folder you're interested in verifying.
- Greg-DB
Dropbox Staff
Dropbox doesn't offer a 'content_hash' or equivalent for entire folders, only files, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
If you want to verify an entire folder, you'd need to check each individual file in the folder you're interested in verifying.
- PeterG-TDANew member | Level 2
Thanks for letting me know Greg.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 2 days 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!