cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C# CopyBatchV2Async Method not working as expected

Highlighted

C# CopyBatchV2Async Method not working as expected

New member | Level 2

The CopyBatchV2Async documentation states that it can "Copy multiple files or folders to different locations at once in the user's Dropbox."  So that means that if I specify FromPath as a folder, and ToPath as a folder in a RelocationPath, it will copy the contents of the FromPath folder to that of the ToPath folder right? What is happening is that CopyBatchCheckV2Async.IsComplete is returning that the batch is complete, however no files are moved. I am testing with a folder that contains a singular file. Can someone clarify if the documentation is correct, that it can copy folders, or perhaps if something else is the problem? 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: C# CopyBatchV2Async Method not working as expected

Dropboxer

You can use CopyBatchV2Async to copy files and/or folders.  Note that this copies the item itself, e.g., the entire folder including the folder itself, not only the folder's contents. The 'ToPath' should be the desired path of the copied item itself, not an existing folder.

E.g., if you want to make a copy of an existing folder at "/MyFolder", you could specify a 'ToPath' value of "/MyFolderCopy", for instance. That would make a copy of "MyFolder", as well as anything inside it, at that "/MyFolderCopy" path. Make sure there isn't already something at the new path, e.g., "/MyFolderCopy", though.

Also, be sure to drill down into the RelocationBatchV2JobStatus.Complete object though, as it doesn't necessarilly mean everything succeeded; only that the job completed. Check each RelocationBatchResultEntry to see the specific results. 

View solution in original post

2 Replies 2
Highlighted

Re: C# CopyBatchV2Async Method not working as expected

Dropboxer

You can use CopyBatchV2Async to copy files and/or folders.  Note that this copies the item itself, e.g., the entire folder including the folder itself, not only the folder's contents. The 'ToPath' should be the desired path of the copied item itself, not an existing folder.

E.g., if you want to make a copy of an existing folder at "/MyFolder", you could specify a 'ToPath' value of "/MyFolderCopy", for instance. That would make a copy of "MyFolder", as well as anything inside it, at that "/MyFolderCopy" path. Make sure there isn't already something at the new path, e.g., "/MyFolderCopy", though.

Also, be sure to drill down into the RelocationBatchV2JobStatus.Complete object though, as it doesn't necessarilly mean everything succeeded; only that the job completed. Check each RelocationBatchResultEntry to see the specific results. 

View solution in original post

Highlighted

Re: C# CopyBatchV2Async Method not working as expected

New member | Level 2

Okay, thank you. The issue was that I was trying to copy some new files into an existing folder that already contained some other files. 

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?