25

I tried using Dropbox to sync my computer's code files, however it syncs everything. I want to be able to configure Dropbox not to sync folders with specific names like ".git" and/or "target" as target folders get generated automatically and gets huge as the development goes.

Is there a way to configure Dropbox to ignore some folders (auto generated or not)?

  • I use Bvckup to copy specific files to Dropbox - bvckup2.com - I've tried Google Drive, OneDrive, and Box. None of them will do what you want, so I suggest you look elsewhere to sync the file & folder structure you need exactly. Even rsync from your dev folder to Dropbox would work. – Sun Aug 31 '19 at 5:07
7

Yes, this is called Selective Sync in Dropbox.

You can exclude specific folders being synced with DropBox.

In Windows 7 and Dropbox 3.1.265, you can:

  • click on Dropbox system tray icon
  • click on gear icon and select Preferences
  • click Account
  • click Selective Sync
  • Untick the folder you no longer wish to sync with Dropbox
  • Click OK

Be warned that Dropbox will delete that folder, so make sure to copy everything to another place before you do this and copy it back afterwards. (Thiago Duarte)

| improve this answer | |
  • 7
    But be warned that Dropbox will delete that folder, so make sure to copy everything to another place before you do this and copy it back afterwards. Or just help us on this request for a better way to solve this dropboxforum.com/hc/communities/public/questions/… – Thiago Duarte Apr 7 '15 at 2:05
  • 13
    I think this is not what the user was asking for. He wants Dropbox to ignore specific folders inside his local Dropbox folder. By contrast, this Selective Sync simply allows to delete some local folders while keeping them only on your Dropbox account, "in the cloud." – Niavlys Mar 14 '18 at 8:08
  • @Niavlys You're certainly describing my problem. I've got a few pieces of junk that end up in my Dropbox folder due to a synchronization program on my computer--and they get backed up. – Loren Pechtel Mar 21 '18 at 13:22
  • @LorenPechtel You can ask Dropbox to exclude more files or file masks if you want: dropbox.com/help/syncing-uploads/files-not-syncing -- Some files are already excluded, maybe .git could be one of them. – Sun Mar 21 '18 at 22:45
  • 1
    For anyone coming from search results, there is no currently Dropbox solution that doesn't require you moving your files to counter their system. Be careful and backup your files because if not you may lose them all. – stwhite Aug 30 '19 at 4:52
7
  1. Copy those folders to another location which isn't synced with Dropbox.
  2. Use selective sync to unsync the original folders (Dropbox will delete them).
  3. Copy the backed up folders to the original location again (They will remain unsynced.)

Source: https://www.dropboxwiki.com/tips-and-tricks/exclude-folders-from-syncing

PS: I agree with the comments below. There seems to have been some change in behaviour in Dropbox's sync function which creates selective sync conflicts. If you are facing this issue, I found yet another alternative - I moved my folders containing large files out of Dropbox and rather put their links (shortcuts) in the desired locations. This syncs them as files and not folders.

| improve this answer | |
  • 2
    this creates new folders with suffix (selective-sync conflict) and dropbox starts syncing them again... – kamal0808 Sep 18 '19 at 10:15
  • 1
    What @kamal0808 said. Seems to be new behavior, since this method has worked for me for at least half a year. – redbeam_ Sep 21 '19 at 0:18
6

execute in powershell:

Set-Content -Path /path/to/ignored/file -Stream com.dropbox.ignored -Value 1

see: How to set a Dropbox file to be ignored | Dropbox Help

| improve this answer | |
  • Why, what does this do? – Pimp Juice IT Jan 8 at 3:27
  • 1
    If I understand the question correctly, this is the right answer. The above is for Windows, and the included link has instructions for Mac as well. I'm impressed that this is user-achievable at all. – Sam Lewallen Jan 19 at 18:26
  • When I attempt this, PS returns an error saying Set-Content: A parameter cannot be found that matches parameter name 'Stream'. for some reason. Which is odd, considering Stream appears in the -?. – corylulu Mar 19 at 20:14
  • Okay, so apparently this only works if your Dropbox is on your C:\ drive. :\ – corylulu Mar 27 at 2:00
  • This is certainly better than removing security rights for Dropbox to access certain folders. (Access is denied). Going to try this on .git now :) – Sun Jun 13 at 16:09
6

Starting early 2020 you can actually exclude files and directories from sync.

Under Linux the command is:

attr -s com.dropbox.ignored -V 1 /path/to/somewhere

Under macOS the command is about same:

xattr -w com.dropbox.ignored 1 /path/to/somewhere

For the command under Windows see another answer, or:

Set-Content -Path C:\Users\yourname\Dropbox\Example -Stream com.dropbox.ignored -Value 1
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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