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? 🙂
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?
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.
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?
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!
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.Sound good? Let's get started.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!