cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Check out the Dropbox cheat sheet for getting started in 2021 here!

Dropbox files & folders

Get in sync with the Dropbox Community. Our members can answer all your questions on Dropbox files and folders. Join a discussion or start your own today.

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

selective sync from command line

selective sync from command line

New member | Level 2

I work on different computers, running Windows, Linux and MacOS.  I am compiling C++ programs on each computer, from the same source.  There is no use syncing compiled objects and executables across different operating systems, but I would prefer that compiled files be in the same directory (for instance, called Objects or Executables), but I do not want to sync them, otherwise compiling on one computer will overwrite the files from another.  Therefore, I want to select certain directories as being non-syncable.  There are too many of these for me to want to do this by hand (particularly having to do it repeatedly on different computers) so I wondering of there is a way of doing this by a command line, which I can then put in a script, with commands something like:

 

dropbox_config  -sync=False A/B/Objects

 

(what I am looking for here is some sort of command, like the command dropbox_config that I invented here)

 

Then I can generate and run a script to do them all at once.  A script that will run on Windows (perhaps in a Ubuntu shell), or on Linux, MacOs, or all of these would be good.

3 Replies 3

Re: selective sync from command line

Dropboxer

Hi @rihartley, thanks for dropping by!

 

What you're looking for sounds like what is described in this article, where you can set a file or folder to be "ignored" from syncing. 

 

Check it out and let me know if it helps. Cheers!


Lusil
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Re: selective sync from command line

New member | Level 2

This is great.  I understand now how Dropbox uses Auxiliary Data Streams on Windows, with a stream called com.dropbox.ignore.

However, it leads to the follow-up:  I see that doing this will set Dropbox to "ignore" the file, meaning that it will removed

from dropbox, but just stay on the computer.  

Is there a similar way that allows you do basically the opposite -- i.e. remove the file from my computer but retain on dropbox.

This is what happens with "selective sync", that I can choose from the graphic interface, but I prefer a command-line solution.  

The same question for selecting "local / Online-only" with smart-sync.  

I am guessing that this information is present in the ADS file com.dropbox.attrs, but this appears to be a binary file, so I cannot guess

what the format is.

 

Re: selective sync from command line

Dropboxer

Thanks for getting back to me, @rihartley

 

Although there isn't direct way to do this right now, you can post this here, where other users can comment and upvote. 

 

In the meantime, if you have any other questions, don't hesitate to get back to us. 

 

Cheers!


Lusil
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Polls
Are you starting new work habits this year?

Work Smarter with Dropbox

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.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?