Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Andry1's avatar
Andry1
Explorer | Level 3
9 years ago

Rename files without losing any versions

Hello. I'm trying to rename the files as follows (.Net):
using (var dbx = new DropboxClient(user.DropboxAccessToken))
{
await dbx.Files.MoveAsync(string.Format("/{0}/{1}", pathWithoutName, oldName), string.Format("/{0}/{1}", pathWithoutName, newName), true, true);
}
As a result, I lose the version of the file.
Can I rename the files without losing any versions?
Thank you!

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Unfortunately, there isn't currently a good solution here. After you move/rename a file, listing the revisions at the new path won't show the old revisions.

    As a workaround though, you can call to list the revisions at the previous path, and they will still be there.
  • Andry1's avatar
    Andry1
    Explorer | Level 3
    9 years ago

    Thanks for the answer.
    If the file is renamed, say, three times. I want to see all revisions. To this end, I have to send requests to the three paths to unite them and display them. Do I understand correctly?

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

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!