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, 2019 at 5:07

4 Answers 4


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
  • 1
    Based on this approach, I've recently implemented dropboxingore which is a simple shell script that allows you to ignore files using glob patterns (like .gitignore). Hope to find it useful. Jan 2, 2021 at 13:00
  • Should this immediately cause dropbox to delete the corresponding files on the cloud? Or is there something I need to do in order to get it to do this. Can I delete them from the cloud (using browser) and still keep them on my local copy after I added the ignore attribute? I noticed that I did not immediately get extra space available again after having ignored many very large files.
    – Kvothe
    Jan 25, 2021 at 17:56

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

  • Why, what does this do? Jan 8, 2020 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. Jan 19, 2020 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, 2020 at 20:14
  • Okay, so apparently this only works if your Dropbox is on your C:\ drive. :\
    – corylulu
    Mar 27, 2020 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, 2020 at 16:09

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)

  • 9
    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/… Apr 7, 2015 at 2:05
  • 16
    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."
    – sylbru
    Mar 14, 2018 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. Mar 21, 2018 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, 2018 at 22:45
  • 2
    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, 2019 at 4:52
  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.

  • 2
    this creates new folders with suffix (selective-sync conflict) and dropbox starts syncing them again...
    – kamal0808
    Sep 18, 2019 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, 2019 at 0:18

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.