We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
MissVioletDeVille
4 years agoExplorer | Level 3
Sample script to find files that match a file name pattern and rename them?
OS - Windows 10
I recently noticed that there's a sync issues dialog that pops up from time to time--it's not clear what triggers this dialog to open or how to open this dialog manually--and it tells me of files that can't be synced (ie. a disallowed character in the Windows file name scheme like a question mark).
I'm looking for a script I can run that would search my files via the API for these invalid files and then rename those files rather than renaming those files via the web UI.
Please and thank you!
1 Reply
- Greg-DB4 years ago
Dropbox Community Moderator
While Dropbox doesn't offer a pre-built script like this (though maybe someone else in the forum here has something to share), Dropbox does offer an API you can use for programmatically listing and moving/renaming files, among other operations, which you could use to write a script for this. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here. You may be interested in the Getting Started Guide and File Access Guide.
And specifically, you'd probably want to use the /2/files/list_folder[/continue] and /2/files/move_v2 endpoints. By the way, those are links 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 Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 9 months 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!