We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Gyanendra's avatar
Gyanendra
Explorer | Level 3
5 years ago

How to move file from one dropbox folder to another using c#.net

Hi,

 

I am using dropbox api in my c# code to upload files in dropbox. Now I want to move file from one dropbox folder to another dropbox folder using my c#.net code. I am using moveAsync of DropboxClient. But file not moving .Received error "to/conflict/folder/...".

 

Can anyone help on that.

sharing my source code:

 

public async Task MoveFile(DropboxClient client, string FromPath,string ToPath)
{
try {
var result = await client.Files.MoveAsync(FromPath, ToPath);
}
catch(Exception ex)
{
throw (ex);

}

}

 

Please help. Thanks !

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    A 'to/conflict/folder' indicates that the move failed because "There's a folder in the way.". That is, your 'ToPath' value is the path to an existing folder. That value should be the full path and name where you want put the item. For example, if you want to move the file inside an existing folder at "/folder", the value should be like "/folder/file.ext" (not just "/folder").

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,033 PostsLatest Activity: 3 years ago
409 Following

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!