You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
anjanesh
5 years agoHelpful | Level 6
.dropbox-ignore to prevent folders being uploaded to DropBox like git's .gitignore
Just like we have .gitignore for preventing files / folders to be uploaded to github, it would be nice to have the same for DropBox.
I have a workspace folder with tons of node_modules folders.
I...
- 5 years ago
Got the answer here : https://help.dropbox.com/files-folders/restore-delete/ignored-files
Bloodreaver
2 years agoNew member | Level 2
Hello!
This will not be an ideal solution for everyone but I find it useful. I am using windows 11 and this works well for me, I basically just use it on my node.js projects' node_modules directory to stop all that junk from being synced.
The end result, you can see the node_modules folder is now being ignored:
You will need to modify the registry and store some powershell script files somewhere on your system where they won't be moved or deleted etc. You could even store them in your dropbox if you wanted! If you are not comfortable doing this then you will have to find a different solution.
There are 4 files to make, 1 registry file and 1 powershell script file for adding the ignore and another 1 of each to remove the ignore, if you wish.
If you are comfortable using regedit, you could forego creating the registry files in favour of manually creating the keys and values, but I'll leave that up to you.
- You may change the key names in the registry to whatever you wish, I just used dropbox_ignore and dropbox_stop_ignoring for the sake of simplicity, you may also change the text displayed in the context menu if you like.
- The ampersand (&) is used to define a mnenomic key which can be used to select the command quickly with the keyboard, in this case I have elected to use "d" for both but you may change it, just move the ampersand to just before whichever letter you wish you use as the mnenomic.
- I suggest leaving the path to powershell.exe as is, I have powershell 7 installed and I did try to direct it to that instead initially but it refused to work, whereas just using the 1.0 powershell seems to work fine, I'm not sure why but if it ain't broke don't fix it, I suppose.
Yes, all those backslash characters (\) are necessary, and if you change the path to your powershell scripts, be sure to put two backslashes to represent a directory separator as it must be "escaped" (the backslash character is used to tell the system that the character following it is a literal character and not an escape character, so we have to use two there, and four in the actual powershell path).
To use these, simply create the files as shown below and then run the .reg files to insert the values into the registry, or create the keys and values manually if you prefer. Once you've done that, the commands should show up in your explorer shell context menus when you right click upon a folder. In Windows 11, you will likely have to choose the "Show More Options" menu item at the bottom of the context menu in order to see the new commands.
Registry File: dropbox ignore command.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\dropbox_ignore]
@="&Dropbox Ignore"
[HKEY_CLASSES_ROOT\Directory\shell\dropbox_ignore\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -File \"C:\\powershell scripts\\dropbox\\dropboxignore.ps1\" \"%L\""
Powershell Script: dropboxignore.ps1
$path = $args[0]
Set-Content -Path $path -Stream com.dropbox.ignored -Value 1
Registry File: dropbox stop ignore command.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\dropbox_stop_ignoring]
@="&Dropbox Stop Ignoring"
[HKEY_CLASSES_ROOT\Directory\shell\dropbox_stop_ignoring\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -File \"C:\\powershell scripts\\dropbox\\dropboxignore-remove.ps1\" \"%L\""
Powershell Script: dropboxignore-remove.ps1
$path = $args[0]
Clear-Content -Path $path -Stream com.dropbox.ignored
I hope this helps some people, until Dropbox finally just adds their own command to the context menu and/or support for ignore files.
Happy syncing!
About Create, upload, and share
Find help to solve issues with creating, uploading, and sharing files and folders in Dropbox. Get support and advice from the Dropbox Community.
Need more support
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!