The fastest and easiest way to exclude a folder or file from synchronization with Dropbox for Windows OS.
You can also recursively exclude all node_modules
folders in all subfolders.
Preview in context menu
- Right-click on the file or folder.
- Select "Ignore from Dropbox" from the context menu.
- Ready. After some time, the Dropbox application will stop synchronizing the selected file or folder.
- Right-click on the file or folder.
- Select "Ignore node_modules from Dropbox" from the context menu.
- Bingo! After some time, the Dropbox app will stop syncing all
node_modules
folders inside the selected folder.
- Download the archive with files in the upper right corner of the page.
- Unzip and double-click the
Install_Ignore_From_Dropbox_Context_Menu.reg
file. - There are now two custom menu items in your context menu (as in the screenshot above).
To delete, double-click the Uninstall_Ignore_From_Dropbox_Context_Menu.reg
file.
Now the two custom menu items you added earlier have disappeared from your context menu.
The menu items of Dropbox itself are not edited/updated/deleted in any way.
- First the script finds the
node_modules
folder - then marks the stream parameter
com.dropbox.ignored
as1
- then moves on to the next
node_modules
folder found
In some cases, all the files in the node_modules folder can be already indexed by Dropbox. And marking only the
node_modules
folder will not allow you to cancel the current active synchronization of these files.In this case, you must marking this stream parameter
com.dropbox.ignored
to all nested files and folders. It can take some time.
Examples of manual control via powershell console:
# print all node_modules paths
Get-ChildItem -Path "./" -Filter "node_modules" -Directory -Recurse | Where-Object { $_.FullName -notlike '*\node_modules\*' } | ForEach-Object { Write-Host $_.FullName }
# set ingoring only top node_modules paths (excluding nested node_modules)
Get-ChildItem -Path "./" -Filter "node_modules" -Directory -Recurse | Where-Object { $_.FullName -notlike '*\node_modules\*' } | ForEach-Object { Set-Content -Path $_.FullName -Stream com.dropbox.ignored -Value 1 ; Write-Host (Get-Content -Path $_.FullName -Stream com.dropbox.ignored) $_.FullName }
# print all files and folders in node_modules paths
Get-ChildItem -Path "./" -Filter "node_modules" -Directory -Recurse | ForEach-Object { Get-ChildItem -Path $_.FullName | ForEach-Object { Write-Host $_.FullName} }
# set ingoring all files and folders in node_modules paths (including nested node_modules)
Get-ChildItem -Path "./" -Filter "node_modules" -Directory -Recurse | ForEach-Object { Get-ChildItem -Path $_.FullName | ForEach-Object { Set-Content -Path $_.FullName -Stream com.dropbox.ignored -Value 1 ; Write-Host $_.FullName} }