Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here! 

Forum Discussion

rihartley's avatar
rihartley
New member | Level 2
5 years ago

selective sync from command line

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

Replies have been turned off for this discussion
  • Lusil's avatar
    Lusil
    Icon for Dropbox Staff rankDropbox Staff
    5 years ago

    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!

  • rihartley's avatar
    rihartley
    New member | Level 2
    5 years ago

    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.

     

  • Lusil's avatar
    Lusil
    Icon for Dropbox Staff rankDropbox Staff
    5 years ago

    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!

About Create, upload, and share

Find help to solve issues with creating, uploading, and sharing files and folders in Dropbox. Get support and advice from the Dropbox Community.

Need More Support

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!