冲突文件夹移动 Dropbox API?

Conflict folder move Dropbox API?

我正在尝试将一些文件从一个文件夹移动到另一个文件夹。

这是我的 curl 请求:

curl -X POST https://api.dropboxapi.com/2/files/move \
  --header 'Authorization: Bearer faketokenjskahdLDAKHDALjdj8287ew98ehsahdkkadjhk' \
  --header 'Content-Type: application/json' \
  --data '{"from_path":"/folder1","to_path":"/folder2/folder2.1"}'

每当我调用它时,我都会得到这样的响应:

{
  "error_summary": "to/conflict/folder/...",
  "error": {
    ".tag": "to",
    "to": {
      ".tag": "conflict",
      "conflict": {
        ".tag": "folder"
      }
    }
  }
}

文档对响应中的特定关键字进行了如下说明:

conflict :  Couldn't write to the target path because there was something in the way.

folder:  There's a folder in the way. 

怎么会有文件夹挡路?这到底是什么意思?我不确定如何解决这个问题。

可以找到 /move 端点的文档 here

通过请求 folder1/ 中的文件列表然后遍历每个文件并移动它们来实现这一点 from_path folder1/filename to_path folder2/folder2。 1/文件名

我需要将文件名放在两个路径的末尾以避免任何冲突!