We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
David27
8 years agoNew member | Level 2
.NET Compare files on disk with those on the cloud and download files that different
Hello,
As in the topic, I want to do a program that will compare files that are on the computer and those on the dropbox and only download files that do not match. I never programming API for dropbox and I dont know how start.
1 Reply
- Greg-DB8 years ago
Dropbox Community Moderator
[Cross-linking for reference: https://stackoverflow.com/questions/45805431/c-sharp-compare-files-on-disk-with-those-on-the-cloud-and-download-files-that-di ]
If you're using .NET, we recommend using the official Dropbox API v2 .NET SDK:
https://github.com/dropbox/dropbox-sdk-dotnet
There's a guide there for getting started.
For your use case in particular, you can list files in any folder using listFolder:
https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_ListFolderAsync_1.htm
You can check the returned FileMetadata.ContentHash and compare with your local copy:
https://dropbox.github.io/dropbox-sdk-dotnet/html/P_Dropbox_Api_Files_FileMetadata_ContentHash.htm
You can find information on computing the content hash value for your local files here:
https://www.dropbox.com/developers/reference/content-hash
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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!