A cross-platform CLI tool to ignore or unblock files and folders in Dropbox using platform-specific methods, based on official documentation here https://help.dropbox.com/sync/ignored-files
- Cross-platform support (Windows, macOS, Linux)
- Wildcard and glob pattern support
- Automatic detection and removal of Dropbox conflicted copies
- Batch processing of multiple paths
- Unblock (reverse) operation to restore syncing for previously ignored files
- Verbose and quiet modes
- PyPI distribution for easy installation
pip install dropblock-cligit clone https://github.com/yourusername/dropbox-ignore-cli.git
cd dropbox-ignore-cli
pip install -e .Or for system-wide installation:
pip install .Ignore files/folders (stop Dropbox sync):
dropblock /path/to/file
dropblock /path/to/folderUnblock files/folders (restore Dropbox sync):
dropblock --unblock /path/to/file
dropblock --unblock /path/to/folderIgnore multiple files/folders:
dropblock file1.txt folder1 file2.pdfUnblock multiple files/folders:
dropblock --unblock file1.txt folder1 file2.pdfIgnore parent folder (path ending with *):
dropblock /path/to/folder/*Ignore files matching a pattern:
dropblock /path/*/specific/file.txt
dropblock /home/user/*/node_modules--unblock: Unblock files instead of ignoring them (restore Dropbox syncing)--ignore-conflicts: Don't remove conflicted copies when ignoring files-n, --no-output: Suppress the list of ignored/unblocked files-v, --verbose: Show verbose output
Ignoring files and folders:
# Ignore node_modules in all projects
dropblock ~/projects/*/node_modules
# Ignore a folder and don't remove conflicts
dropblock --ignore-conflicts ~/Dropbox/large-folder
# Quiet mode - no output
dropblock -n ~/Dropbox/temp/*
# Verbose mode
dropblock -v ~/Dropbox/cache ~/Dropbox/logsUnblocking files and folders:
# Restore syncing for a previously ignored folder
dropblock --unblock ~/Dropbox/large-folder
# Unblock multiple paths with verbose output
dropblock --unblock -v ~/projects/*/node_modules
# Restore syncing for cache folders
dropblock --unblock ~/Dropbox/cache ~/Dropbox/logsCommon workflows:
# Temporarily ignore large folders during initial sync
dropblock ~/Dropbox/videos ~/Dropbox/archives
# Later restore syncing when needed
dropblock --unblock ~/Dropbox/videos ~/Dropbox/archivesThe tool uses platform-specific methods to set or remove the ignore attribute:
- Windows: Uses PowerShell to set the
com.dropbox.ignoredstream - macOS: Uses
xattrto setcom.dropbox.ignoredattribute - Linux: Uses
attrcommand to setcom.dropbox.ignoredattribute
- Windows: Uses PowerShell to clear the
com.dropbox.ignoredstream - macOS: Uses
xattrto remove thecom.dropbox.ignoredattribute - Linux: Uses
attrcommand to remove thecom.dropbox.ignoredattribute
When files are ignored, Dropbox stops syncing them but keeps local copies. When unblocked, Dropbox resumes syncing and the files become available across all devices again.
By default, the tool automatically detects and removes Dropbox conflicted copies (files matching the pattern filename (user's conflicted copy date).ext). Use --ignore-conflicts to disable this behavior.
- Python 3.8+
- Platform-specific tools:
- Windows: PowerShell (built-in)
- macOS: xattr (built-in)
- Linux: attr package (
sudo apt install attron Debian/Ubuntu)
MIT