We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
XiangZhou
3 years agoNew member | Level 2
How to merge two folders with Dropbox.Net SDK?
Dear support, To rename a folder, I call the MoveV2Async(pathOld, pathNew). If the pathNew exists, it fails with an error "to/conflict/folder/". If the destination folder already exists, ...
Greg-DB
Dropbox Community Moderator
3 years agoXiangZhou Здравко is correct; the Dropbox API doesn't offer a way to merge folders like this directly, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. You'd need to handle this in your code like they described. If/when you need to move multiple items, using MoveBatchAsync can help.
XiangZhou
3 years agoNew member | Level 2
Thanks for your suggestion.
I am trying to implement it manually by deleting files in the destination folder firstly if exist and then move the files.
After calling the DeleteBatchV2Async, how do I safely wait until the files have been completely deleted before calling the MoveBatchAsync. Could you show me some sample code?
- Greg-DB3 years ago
Dropbox Community Moderator
I don't believe we have sample code for DeleteBatchAsync in particular unfortunately, but you should poll DeleteBatchCheckAsync to see when the job is done. Refer to the documentation linked there for more information.
By the way, it looks like you mixed up DeleteBatchAsync with DeleteV2Async or MoveBatchV2Async; there's no DeleteBatchV2Async.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!