cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to make our Community work for you and we need your help. Take our short survey!
Close

Dropbox ideas

Got an idea for Dropbox? We want to hear it. Our team will review the top voted ideas, so share them here!

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

Ignore folder (without selective sync)

Ignore folder (without selective sync)

Helpful | Level 6

Please please please can you add a feature that allows folders to be excluded from the Dropbox account (on windows and mac). For sure I'm not the first person to request this, but I'm yet to find a good explanation of why it's not there. A quick google search reveals loads of people also looking for the same feature. I really like the workflow I have with dropbox, but it's getting to the point where I might switch providers in order to allow better selective sync.

I've seen hackish solutions using selective sync, but it would be great if this could be done in one of the following ways:
- global pattern matching eg "node_modules"
- a marker file in the directory like .dropboxignore
- a simple right click context menu "Ignore this folder"

Other than that, keep up the good work. Cheers.
Tom

909 Comments
New member | Level 2
New member | Level 2

I realize this original topic is 6 years old, but I agree, something like a .gitignore would be incredibly helpful.  I've got an issue where I'm synching game saves on dropbox using symlinks (which works wonderfully, for the most part), but a specific game uses a ".new" directory as some kinda diff check/temporary cache when it autosaves.  Dropbox attempting to synch is messing with the autosave (but not manual save, thankfully), and worse, when I set the directory to Ignored, because it's a temporary directory, the Ignored status goes away every single time the directory is deleted and re-initialized.

 

Having any sort of pattern matching for exclusion instead would be an incredibly powerful feature.

Explorer | Level 4

I creates this powershell scripts that reads a .dropboxignore file and set all the folders recursively to be ignored.

 

# https://help.dropbox.com/en-us/files-folders/restore-delete/ignored-files

$ignoreList = Get-Content .dropboxignore
$folderList = Get-ChildItem -Path . -Recurse -Directory -Force -ErrorAction SilentlyContinue | Select-Object FullName
$baseList=@()
"Ignoring the following folders:"
$ignoreList

""
foreach ($folder in $folderList)
{
foreach ($ignore in $ignoreList)
{
$ignore = $ignore.Trim()
$index = $folder.FullName.IndexOf($ignore)
if ($index -ge 0 )
{
$base = $folder.FullName.SubString(0, $index+$ignore.Length)
if ( ! $baseList.Contains($base))
{
$base
Set-Content -Path "$base" -Stream com.dropbox.ignored -Value 1

$baseList = $baseList + $base
}
break
}
}
}
""
"Folders ignored:"
$baseList

# Clear-Content -Path 'C:\Users\yourname\Dropbox\ (Personal)/YourFileName.pdf' -Stream com.dropbox.ignored
# Set-Content -Path C:\Users\lars\Dropbox\RaiseYourFinger\node_modules -Stream com.dropbox.ignored -Value 1

 

It's not perfect, but it suits my needs.

Explorer | Level 4

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 let's face it. This is mostly an option for computer professionals anyway.

Explorer | Level 3

This would be amazingly useful, just like a .gitignore.  Dropbox's selective sync extremely difficult to use because it needs to be set up on every single device.  the ability to drop a ".dropboxignore" file in a folder would make like so much easier.

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.

Helpful | Level 5

@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.

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>
Helpful | Level 5

@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. 

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?

Vote for this idea

Like this idea? Vote for it and we will give it the attention it deserves!

1,157 votes received Status: Accepted