Getting a not very intuitive error whenever I try to move files from one folder to another using the API. Please check out my full question in stackoverflow here: http://stackoverflow.com/questions/36169788/conflict-folder-move-dropbox-api
It looks like you already got this working.
For reference, the /move endpoint lets you move items, be it files or folders. Both the to_path and from_path must specify the full, exact path of the existing item and the new desired path, respectively. If you wanted to move an entire folder, which is currently at /folder1, to be a folder at named folder2.1, inside a folder at /folder2, you need to make sure there isn't already a folder at /folder2/folder2.1 (even if the existing folder2.1 is empty).
Alternatively, to move all of the contents of a folder from one folder to another, you have to loop through to move each item as desired, like you described in your answer.
yes! I ended up doing exactly that - looping through each file. I was under the impression that by not specifying the full path, it would move all the contents of the folder, and that is (at least in my eyes) what the description of the endpoint says in the docs!
"Move a file or folder to a different location in the user's Dropbox.If the source path is a folder all its contents will be moved."
Instead, when I wasn't specifying the file in the path, it would attempt to move the folder itself, not just the contents!
In addition the definition of to_path is the following: "to_path String Path in the user's Dropbox that is the destination."
to_path
It doesn't say anything about having to specify how you'll be calling the file/folder that you are trying to move. So I thought that the path specified was just my destination and the name of my file would be inherited from the source. Hence there would be a conflict. It might be because English isn't my native language that I am getting confused by these definitions, but I think it would help making them clearer in the docs regardless.
For instance, the definition of the error didn't help much either. Instead of "conflict" meaning "there is something in the way" it might be better to say "there is a folder or file in the destination that is named like your to_path destination" or something along those lines...