4
votes

I'd like to rename a file on Dropbox using the HTTP API.

According to the new docs, it is possible to move, but not to rename?

https://www.dropbox.com/developers/documentation/http/documentation#files-move

I'd also like to be able to modify other metadata, especially client_modified, without having to re-upload the file.

Is the documentation current, or are there additional features available?

2

2 Answers

6
votes

Ah, great, I found out that the move API can be used to rename as well.

Great!

Still unable to modify client_modified for existing files though.

2
votes

Dropbox uses Move API to Rename File/Folder, you can find accurate function/API call on official Dropbox Dev. Docs

HTTP: https://www.dropbox.com/developers/documentation/http/documentation#files-move

DOT-NET SDK (MoveV2Async): http://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_MoveAsync_1.htm

update the from-Path & to-Path value, with your updated values

{
    "from_path": "/Path/HelloWorld.txt",
    "to_path": "/Path/foo.txt"
}

it will rename "HelloWorld.txt" to "foo.txt", in "/Path" Directory