After another user asked this question: Dropbox on linux server - how to include/exclude folders?

My icon is still not working after performing some of the steps listed in other questions and answers:

Edit: In case anyone was wondering while reading this post, I was able to get my icon to show up finally by following these links:

The question should still be valid for anyone that wants to do this from the command line.

There was an answer for excluding, but not one for including. Is there any way to achieve this?

I see the former command listed in the dropbox command's help text, but not anything that could help me with including.

Does anybody know how to achieve this?

Here is the current help text that I see:

Dropbox command-line interface  

commands:  

Note: use dropbox help <command> to view usage for a specific command.  

 status       get current status of the dropboxd  
 help         provide help  
 puburl       get public url of a file in your dropbox  
 stop         stop dropboxd  
 running      return whether dropbox is running  
 start        start dropboxd  
 filestatus   get current sync status of one or more files  
 ls           list directory contents with current sync status  
 autostart    automatically start dropbox at login  
 exclude      ignores/excludes a directory from syncing  
 lansync      enables or disables LAN sync  

I also found some official Dropbox help documentation that also strangely only mentions excluding files, without including others from the Dropbox folder that are not currently synced.

up vote 20 down vote accepted

To exclude all files/folders:

  • cd to your dropbox folder (usually cd ~/Dropbox)
  • then type ~/bin/dropbox.py exclude add * This will exclude everything in your dropbox folder from syncing. (Be careful! This will remove all the files that you synced)
  • Then, if you want to start syncing the folder "dir", type ~/bin/dropbox.py exclude remove dir

Taken from http://www.dropboxwiki.com/tips-and-tricks/using-the-official-dropbox-command-line-interface-cli#comment-1778553228

  • 4
    This will of course remove all the files that you synced (since by default it's everything), then re-add the one directory and re-download it - be aware of that.. – frumbert Nov 17 '16 at 4:25
  • @frumbert edit my answer to better reflect this – undersound May 4 '17 at 20:10
  • Use ~/Dropbox/* instead of just * when excluding. – Gayan Weerakutti Jan 15 at 7:24
  • How can i prevent new created folder and file for sync with dropbox – Monarch1 Jan 19 at 10:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.