Forum Discussion

vineet's avatar
vineet
Explorer | Level 3
6 years ago

Rename file via web api

Hello team ,

                     I want to rename a file or folder via web API. I am not able to find sepecific api for renaming. please help 

3 Replies

  • vineet's avatar
    vineet
    Explorer | Level 3
    6 years ago

    Thanks for the reply. No intent to move file or folder. I just want to rename a folder and document name via web api.

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

    vineet Здравко is correct, to rename a file via the API, you should use /2/files/move_v2. To rename a file, you should include the full path and file name for the old path/name and new path/name in the 'from_path' and 'to_path' parameters, respectively. You don't need to change any parent path components though. For example, you could specify "/Documents/oldname.ext" and "/Documents/newname.ext" to rename a file in the "Documents" folder.

     

    By the way, that's a link to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints. 

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

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, Facebook or Instagram.

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!