cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox tips & tricks

Learn how to get the most out of Dropbox with other users like you.

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

[Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1.0

Collaborator | Level 8

Hello Everyone

 

If you like me absolutely loathe the fact that you can no longer use Selective Sync to make Dropbox ignore certain files or folders, this is for you, due to COVID19 im stuck retrofiting hundreds of machines, having to manually ignore every file was taking forever so i decided to use a version of a tweak i use for "Powershell as Administrator here" to add add/remove ignore a file/folder functionality to Dropbox with the Windows Explorer right-click context menu.

 

Why it has been down to us to make these kinds of mods/hacks to enable this functionality instead of DropBox offering it by default is beyond me, especially if all it took was a simple registry mod/hack, but none the less here it is.

 

To avoid issues with trading files/viruses etc I will include only the code needed to recreate the REG files from scratch, copy this code into a TXT file and rename it to .REG, then run it, if you do not understand this process seek assistance by a professional (https://www.howtogeek.com/382727/what-is-a-reg-file-and-how-do-i-open-one/), and make sure to always backup your registry first as a precaution.

 

To REMOVE/DISABLE the extension run this:

Windows Registry Editor Version 5.00

;: [Registry File] Functionality: Remove Ignore File/Folder to Right Click Context Menu (Windows) v1.0.0
;: Created by: XionicFire
;: Dropbox Forums: https://www.dropboxforum.com/t5/Dropbox-tips-tricks/Registry-File-Functionality-Add-Ignore-File-Folder-to-Right/m-p/404846
;: This file removes right-click support and functionality to DropBox to enable and disable specific files or folders from being synced.
;: At least one good thing came out of COVID19

; CLEAN OLD ENTRIES
-[HKEY_CLASSES_ROOT\*\shell\DropboxIgnore\command]
-[HKEY_CLASSES_ROOT\*\shell\DropboxIgnore]
-[HKEY_CLASSES_ROOT\*\shell\DropboxUnIgnore\command]
-[HKEY_CLASSES_ROOT\*\shell\DropboxUnIgnore]
-[HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore\command]
-[HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore]
-[HKEY_CLASSES_ROOT\Directory\shell\DropboxUnIgnore\command]
-[HKEY_CLASSES_ROOT\Directory\shell\DropboxUnIgnore]

 

To ADD/ENABLE the extension run this:

Windows Registry Editor Version 5.00

;: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1.0
;: Created by: XionicFire
;: Dropbox Forums: https://www.dropboxforum.com/t5/Dropbox-tips-tricks/Registry-File-Functionality-Add-Ignore-File-Folder-to-Right/m-p/404846
;: This file adds right-click support and functionality to DropBox to enable and disable specific files or folders from being synced.
;: At least one good thing came out of COVID19
;: Changelog:
;: V1.1.0 - Added change suggested by @corylulu (Thanks!) from -Path to -LiteralPath, this change allows this to work on folders/files containing [ or ] characters in their names
; CLEAN OLD ENTRIES -[HKEY_CLASSES_ROOT\*\shell\DropboxIgnore\command] -[HKEY_CLASSES_ROOT\*\shell\DropboxIgnore] -[HKEY_CLASSES_ROOT\*\shell\DropboxUnIgnore\command] -[HKEY_CLASSES_ROOT\*\shell\DropboxUnIgnore] -[HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore\command] -[HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore] -[HKEY_CLASSES_ROOT\Directory\shell\DropboxUnIgnore\command] -[HKEY_CLASSES_ROOT\Directory\shell\DropboxUnIgnore] ;----------------- FILES -------------------- [HKEY_CLASSES_ROOT\*\shell\DropboxIgnore] @="Dropbox - Ignore this File" "Extended"=- "HasLUAShield"="" "Icon"="C:\\Program Files (x86)\\Dropbox\\Client\\dropbox.exe" [HKEY_CLASSES_ROOT\*\shell\DropboxIgnore\command] @="powershell.exe -windowstyle hidden -noLogo -ExecutionPolicy remotesigned -Command \"Set-Location '%V'\"; Start-Process PowerShell -ArgumentList \\\"-Command Set-Content -LiteralPath '%1' -Stream com.dropbox.ignored -Value 1\\\" -verb RunAs" [HKEY_CLASSES_ROOT\*\shell\DropboxUnIgnore] @="Dropbox - Un-Ignore this File" "Extended"=- "HasLUAShield"="" "Icon"="C:\\Program Files (x86)\\Dropbox\\Client\\dropbox.exe" [HKEY_CLASSES_ROOT\*\shell\DropboxUnIgnore\command] @="powershell.exe -windowstyle hidden -noLogo -ExecutionPolicy remotesigned -Command \"Set-Location '%V'\"; Start-Process PowerShell -ArgumentList \\\"-Command Clear-Content -LiteralPath '%1' -Stream com.dropbox.ignored\\\" -verb RunAs" ;-------------- DIRECTORIES ----------------- [HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore] @="Dropbox - Ignore this Folder" "Extended"=- "HasLUAShield"="" "Icon"="C:\\Program Files (x86)\\Dropbox\\Client\\dropbox.exe" [HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore\command] @="powershell.exe -windowstyle hidden -noLogo -ExecutionPolicy remotesigned -Command \"Set-Location '%V'\"; Start-Process PowerShell -ArgumentList \\\"-Command Set-Content -LiteralPath '%V' -Stream com.dropbox.ignored -Value 1\\\" -verb RunAs" [HKEY_CLASSES_ROOT\Directory\shell\DropboxUnIgnore] @="Dropbox - Un-Ignore this Folder" "Extended"=- "HasLUAShield"="" "Icon"="C:\\Program Files (x86)\\Dropbox\\Client\\dropbox.exe" [HKEY_CLASSES_ROOT\Directory\shell\DropboxUnIgnore\command] @="powershell.exe -windowstyle hidden -noLogo -ExecutionPolicy remotesigned -Command \"Set-Location '%V'\"; Start-Process PowerShell -ArgumentList \\\"-Command Clear-Content -LiteralPath '%V' -Stream com.dropbox.ignored\\\" -verb RunAs"

 

These files are provided AS-IS, and may need adjusting for other machines or your specific machine, I have only tested them on windows 10 but they should work for any windows down to 7, I've installed this on 38 machines and counting and its working great.

 

Also please realize this was done in 1 hr, there is definitely room for improvement (remove flicker, hide windows, etc) but I ran into several issues trying to polish it and I honestly do not have time to perfect it, for what I need it for it works excellent, if anyone with higher powershell skills wants to make adjustments to it and perfect it/work out any kinks by all means feel free to comment here, I will be updating the version as people add value to it.

 

I hope this helps people as much as its helped me.

 

Any comments or suggestions greatly appreciated.

 

Note: the screen flickering/windows UAC prompt is normal, windows powershell does not allow scripts to be run as admin by default from the right click menu, so the workaround everyone in the community has used for years (for the right click run as admin powershell) is to run a PowerShell that runs an elevated PowerShell that runs the actual command (WTG Microsoft, that's some great security right there!), so the first flicker you see is the first shell opening, and the second the actual command, this is normal.

Changelog:
V1.1.0 - Added change suggested by @corylulu (Thanks!) from -Path to -LiteralPath, this change allows this to work on folders/files containing [ or ] characters in their names

9 Replies 9
Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.0

Dropboxer
Dropboxer

Hi @XionicFire; how are you today?

 

I just wanted to thank you for dropping by and sharing this with our Community. I'm pretty sure some users who'd like to ignore files from syncing will find it extremely useful.

 

While we're at it, note that your post was caught by our Spam filter probably due to its length and I just unspammed it for you. 

 

I will be leaving the thread open so other users can chime in, but please let me know if you have anything to add or even ask in the meantime Alvaro; I'll be happy to follow up. 

 

Happy Friday and stay safe! 



Walter
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
Still stuck? Ask me a question!
Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.0

Collaborator | Level 8

Thank you Walter!, much apreciated!

 

Being marked as spam was slightly.. frustrating... especially with info this useful.

Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Helpful | Level 5

Heart

Heart

Heart

Heart

Heart

Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Explorer | Level 4

Hello @XionicFire !

First of all, thanks for your work.
I'm trying to make it work on Windows 7, but I have that error : 

PS C:\Users\Seth> Set-Content -LiteralPath 'E:\Dropbox\Project\Path\node_modules' -Stream com.dropbox.ignored -Value 1
Set-Content : A parameter cannot be found that matches parameter name 'Stream'.
At line:1 char:104
+ Set-Content -LiteralPath 'E:\Dropbox\Project\Path\node_modules' -Stream <<<< com.dropbox.ignored -Value 1
  + CategoryInfo : InvalidArgument: ( [Set-Content], ParameterBindingException
  + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SetContentCommand


Do you have any idea ?

Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Collaborator | Level 8
(edited for clarity)
Hi!

Believe it or not im not a super expert in PowerShell, however i am more versed in OS dynamics, that error seems like you are using an old version of PowerShell from windows 7 that does not support this functionality

To upgrade PowerShell follow these instructions:

https://giritharan.com/install-the-latest-powershell-on-windows-7/
Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Explorer | Level 4

@XionicFire thank you, I updated Powershell and now the powershell line works !!!

I now tried your registry file, it does install well (the menu entries are added to the context menu) - but when it select "Dropbox - Ignore this folder" I have the following error : "Application not found".

Untitled-1.jpg


Any chance you have another good idea ?

Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Collaborator | Level 8
Haha yes thats a more easily solveable one, that problem is the PowerShell executable 's location folder is not added to your machines path, in windows 10 its added by default, to do it find out where your powershell.exe file is by doing a file search on your machine, once you find it, follow these instructions to add it to your path and it should work fine

https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/

I know this says windows 10 but dont worry, the process for 7 is exactly the same, this part of the windows ui has not changed since back when they implemented it for the first time in windows NT
Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Explorer | Level 4

Strange, Powershell path does seems to be added the my Path already... 
I tried to take the line bellow : 

powershell.exe -windowstyle hidden -noLogo -ExecutionPolicy remotesigned -Command \"Set-Location 'E:\Dropbox\Projets\FolderToIgnore'\"; Start-Process PowerShell -ArgumentList \"-Command Set-Content -LiteralPath 'E:\Dropbox\Projets\FolderToIgnore' -Stream com.dropbox.ignored -Value 1\" -verb RunAs

And run it inside the console directly, and it does work well...

 

Anyway, thank you for your help

Highlighted

Re: [Registry File] Functionality: Add Ignore File/Folder to Right Click Context Menu (Windows) v1.1

Helpful | Level 6

I have the same problem on my win7 pc unfortunately... works nice on win10 :/

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?