cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sample script to find files that match a file name pattern and rename them?

Sample script to find files that match a file name pattern and rename them?

MissVioletDeVille
Explorer | Level 3

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 1

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?