We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
Brian S.53
8 years agoExplorer | Level 3
Is it possible to copy file by id and specify filename
I'm using the copy_v2 endpoint and I see that you can pass in file ids instead of paths, but is it possible to update the filename at the same time?
Thanks!
3 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
If you're referring to the file specified in 'from_path', not the copy_v2 endpoint doesn't offer a way to simultaneously rename that one.
If you're referring to the file specified in 'to_path', you can either specify a path with the destination path and name you want, or specify a file ID along with 'autorename:true' to have Dropbox automatically rename the resulting copy, since the file ID would already refer to something anyway. - Brian S.538 years agoExplorer | Level 3
I was able to solve this by setting to_path = parentFileId/fileName
As a follow up, are there any plans to make the create_folder endpoint work with file ids in the same way, for instance, by setting path = parentFileId/fileName?
- Greg-DB8 years ago
Dropbox Community Moderator
Thanks for following up. I'm glad to hear you found the solution you were looking for.
I'm not aware of any plans to update create_folder to support file ID-relative paths like that, but I'll pass this along as a feature request.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,033 PostsLatest Activity: 3 hours ago
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 or Facebook.
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!