cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Apps and Installations

Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.

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

Re: Ignore folder (without selective sync)

Feedback on the new desktop app "ignore files" feature.

jvasileff
Helpful | Level 6

@Daphne that's great news! I look forward to trying it out.

But it would also be nice to have a configuration file, like ".dropboxignore", to list paths or patterns to exclude. The reason is that extended attributes are tied to the actual file or folder, and will be gone if the file or folder is deleted and recreated.

The common use case for this is a software build folder that gets deleted and recreated on clean builds. Under xattr system, the "new" build folder would sync to Dropbox even if the "old" build folder had the necessary com.dropbox.ignored xattr.

100 Replies 100

Vercjames
Explorer | Level 3

Regards,

 

As an avid daily dropbox user and sr. programmer, rely on dropbox to synchronize my website folders across all my work stations. While I could use git pulls to synchronize my code folder files, I have thousands of other assets that I want to be synced alongside my codebase. Froma general workflow perspective, dropbox is meeting all my needs and is fast and efficient at accomplishing this task, at least until you get down to downloaded packages. For the developers in the room, you'll know what I'm talking about. "node_modules" or any other package system like "bower_components".  When committing to git we use a .gitignore file to prevent these items from synching, I hope that dropbox will create a feature to support this. Now many people will say "they do, its called Selective Sync" however it doesn't work for 2 reasons. Firstly, I have to manually drill into each project folder to exclude the folder meaning that each new project I add to dropbox has to have a custom configuration.  and Secondly, even when I do engage this feature, dropbox just starts making its own folders calling them: 

  • "node_modules conflict 1" 
  • "node_modules conflict 2"
  • "node_modules conflict 3"
  • etc...

l humbly suggest dropbox create some sort of .gitignore system so I can globally exclude generated files regardless of where they are nested inside my dropbox. 

XionicFire
Collaborator | Level 9

Ok so ive found a workaround... its not .. fun... and i do not recomend it unless you exactly know what you are doing and its going to cause all sorts of problems and in general its a bad idea, but it does the job, sort of.

 

Its based on this:

https://www.sevenforums.com/general-discussion/154423-block-applcation-access-folder.html

 

Essentially you have to edit dropboxes windows execution permissions so it runs on its own user, a user which has only access to read/write its own EXE folders, some windows folders and the dropbox storage folder, once thats done you set them to ignore then block access to the folders you do not want to sync.

 

Dropbox now throws all sorts of errors but it "works" it now properly ignores that folder because it cannot read it due to permissions, however you on your computer can work normally on it.

 

Definitely not the kind of solution i expected but at least its working.

Lars P.3
Helpful | Level 5

The provided solution with com.dropbox.ignored flags are not without issues.

 

1. On computer A, I build an app and it creates node_modules.  That folder gets synced to my other computers.

2. I ignore the folder on computer A, and the folder gets deleted from the other computers.

3. Now I do a build on computer B. That creates node_modules on computer B, and now that folder now gets synchronized to my other computers. But that results in the existing folder on computer A is being renamed "node_modules (Ignored in conflict)".

4. I can now ignore node_modules on computer B and the folder disappears on my other computers.

5. I now have to rename the folder on computer A back to node_modules.

 

If Dropbox had listened to its customers and just created a git style .ignorefolders kind of file, everything would have been much easier. And lets face it. This is mostly an option for computer professionals anyway.

lukew
Explorer | Level 3

We really need some way to ignore folders/files based on path that is stored in place like dbignore file or something similar.

It's needed because there are many cases when user or some app need delete and/or recreate these folders/files.

At this moment 'ignore' function works only until the folder is deleted and created again.

David L.31
Helpful | Level 5

Anyone on Windows found that Set-Content doesn't work for folders any more? It uesd to but now just throws an error.

 

OK, it doesn't work in newer versions of PowerShell. You'll need to find v1 (for me this was in C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe). Using PowerShell 7 won't work.

corylulu
Helpful | Level 6

@David L.31 Use -LiteralPath instead of -Path in the Set-Content command. If you have certain characters like brackets or anything in the path, -Path won't work.

David L.31
Helpful | Level 5

@corylulu Same result:

 

PS D:\DropBox> mkdir test_ignore


    Directory: D:\DropBox

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          25/08/2020    08:52                test_ignore

PS D:\DropBox> Set-Content -LiteralPath D:\DropBox\test_ignore -Stream com.dropbox.ignored -Value 1
Set-Content: Unable to clear content of 'D:\DropBox\test_ignore' because it is a directory. Clear-Content is only supported on files.
PS D:\DropBox>

corylulu
Helpful | Level 6

@David L.31 check the casing of Dropbox in the path maybe? This works on my desktop. Are you are Windows 10? That said, for me, this feature isnt even that helpful because it still attempts scan all the files inside and will lock them during compiles and whatnot. I've resorted to symlinks to get Dropbox to ignore them. 

David L.31
Helpful | Level 5

@corylulu  Yes, the casing is correct, and yes, I'm on Windows 10. The exact same command will work fine in in Powershell v1, but not in Powershell v7. I recently switched to version 7 to support AWS commandlets that I needed, but now have to resort to old powershell when creating new projects (or node_modules accidentally gets deleted). And it is a dogs breakfast during compilation.

 

I thought Dropbox had changed how symlinks worked so that they _are_ synced now?

Thomas D
Explorer | Level 4

I'm not here to say anything new, just to turn up the volume a little on previous comments:

I would also like the ability to ignore all current and future node_modules folders by pattern in a .dropboxignore file à la .gitignore. Just adding the com.dropbox.ignored attribute to node_modules folders in a dozen projects cut my file count by about 100,000. Also, folders like node_modules and build folders tend to be created and deleted often, so we're wasting a lot of system resources to sync something we don't even want synced.

Need more support?