You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Igal Tabachnik
10 years agoNew member | Level 1
Control selective sync programmatically
Hello,
I'm looking for a way to control selective sync programmatically? There's a certain folder I want to sync, for example, in certain hours of the day. With a cron job, I could instruct selective sync to include/exclude a folder.
Is this possible? Can you make it possible? :)
Thanks!
- jeff o.4New member | Level 2
is there a way to tell the dropbox client to ignore certain directories and/or files in a manner similar to a .gitignore file?
sometimes i create numerous temporary files within a directory that is sync'd via dropbox and i'd like to be able to tell the client to not bother syncing the temp files.
of course, i can do this via the client's preferences panel, but this is onerous at best. being able to do so from the command-line would be awesome.
thanks!
- stegeNew member | Level 2
jeff o.4 wrote:is there a way to tell the dropbox client to ignore certain directories and/or files in a manner similar to a .gitignore file?
sometimes i create numerous temporary files within a directory that is sync'd via dropbox and i'd like to be able to tell the client to not bother syncing the temp files.
of course, i can do this via the client's preferences panel, but this is onerous at best. being able to do so from the command-line would be awesome.
thanks!
- Talmo P.New member | Level 1
Any updates on providing any sort of interface for managing selective sync? It's insanely cumbersome to click through to the Selective Sync window and then the directory tree...
- Steve M.Dropbox Staff
If you're asking about whether you can control the "selective sync" feature of the Dropbox desktop client programmatically, the answer is no. We don't provide an API to control the behavior of the desktop client.
- Adam l.11New member | Level 2
Hey Gregory. Thanks for posting. Really appreciate the tools and cross-device sync. They've made my life a ton simpler in most cases.
You mention tracking the issue as a feature request. Is there a canonical place to vote for it? I upvoted this thread. It appears to be one of many threads that reference a similar issue. I wonder if the different threads are diluting its priority.
My particular use case that many other devs also struggle with: As a dev, one command like "npm install" can generate thousands of tiny files in an auto-generated directory called "node_modules". When I type "npm install", Dropbox goes into an indexing and syncing phase. I smack my forehead and say "Dropbox!! No!! Don't sync all those!!!" but it's too late. I have to wait for 10all those tiny files to sync before I can even use selective sync on the node_modules directory.
A second use case, happening right now, is that Dropbox is getting in the way of working. I just deleted a bunch of those directories, well over 400,000 files (which I would have ignored programmatically) that I created before I used dropbox, and dropbox has been syncing/indexing for over 24 hours. That's fine. However, I can't create a new folder ignored with selective sync because selective sync won't show new folders when it's still trying to sync/index other deleted ones. Spending a lot of time on workarounds. Any suggestions on how to get selective sync to see new folders before it's done syncing would be appreciated.
Anyway. Thanks again. Appreciate all your work and your responsiveness on this thread!
Adam
- Leah C.1New member | Level 1
I think you might be able to do this via the Dropbox Core API.
The trick would be to not sync the folder via the desktop client (by unselecting it using selective sync). Then, with your cron job, maybe check if any files need to be updated and use the /files_put method to update any changed files.
Does that sound like what you're looking for?
- stegeNew member | Level 2
Leah C.1 wrote:I think you might be able to do this via the Dropbox Core API.
The trick would be to not sync the folder via the desktop client (by unselecting it using selective sync). Then, with your cron job, maybe check if any files need to be updated and use the /files_put method to update any changed files.
Does that sound like what you're looking for?
- Greg-DBDropbox Staff
There still isn't a programmatic interface for controlling Selective Sync settings like this, but we're tracking it as a feature request.
- b9chrisHelpful | Level 6
This is my #1 problem with Dropbox. Either:
1. It's on while coding in Visual Studio, which constantly breaks the application while running and continually causes files I'm not editing to prompt me for reload. It occasionally corrupts my work, swapping in a slightly older version of a file I was just working on.
2. It's off while coding, which is the majority of my day, eliminating the real-time backup benefits of Dropbox.
3. It's off Selective Sync for my code folder, which is just 2 again
4. I Selective Sync every single scratch folder Visual Studio uses, every single bin and obj folder throughout my machine, which is at least 500 folders and increases over time as I take on new projects.
It's been 5 years of this. It's time for Dropbox to adopt a .gitignore style file. Heck just give me literally that file and name it .dropboxignore
- Jonathan L.24Helpful | Level 5I'd like to see this too.
- Greg-DBDropbox Staff
No update on this.
- jeff o.4New member | Level 2
thanks gregory.
i'm using macos and dug around to see if dropbox stores the list of directories to skip in a local plist but didn't find anything.
do you know if there's a way to use the macos "defaults" system to configure the skipped directories?
- Greg-DBDropbox Staff
I don't think it works like that, but unfortunately even if the list is accessible locally somewhere, we can't recommend or support attempting to modify it like that, as it wouldn't be an officially supported interface.
- Greg-DBDropbox Staff
Thanks for the detailed feedback Adam! We don't have another place to vote on these requests; your post here is fine. Unfortunately I don't have a good solution to offer you though. Apologies I don't have any news!
- Jason R. C.Helpful | Level 6
I also would like this feature to avoid syncing other suppert files like tox virtual environments.
- philip-lfExplorer | Level 4
Hey Greg, any update on a selective sync API or dropbox ignore file? thanks
- Greg-DBDropbox StaffNo, I don't have an update on this.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,896 PostsLatest Activity: 4 hours agoIf 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!