dropblock-cli
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
Features
- 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
Installation
From PyPI (Recommended)
pip install dropblock-cli
From Source
git clone https://github.com/yourusername/dropbox-ignore-cli.git
cd dropbox-ignore-cli
pip install -e .
Or for system-wide installation:
pip install .
Usage
Basic Operations
Ignore files/folders (stop Dropbox sync):
dropblock /path/to/file
dropblock /path/to/folder
Unblock files/folders (restore Dropbox sync):
dropblock --unblock /path/to/file
dropblock --unblock /path/to/folder
Multiple paths
Ignore multiple files/folders:
dropblock file1.txt folder1 file2.pdf
Unblock multiple files/folders:
dropblock --unblock file1.txt folder1 file2.pdf
Wildcard patterns
Ignore parent folder (path ending with *):
dropblock /path/to/folder/*
Ignore files matching a pattern:
dropblock /path/*/specific/file.txt
dropblock /home/user/*/node_modules
Options
--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
Examples
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/logs
Unblocking 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/logs
Common workflows:
# Temporarily ignore large folders during initial sync
dropblock ~/Dropbox/videos ~/Dropbox/archives
# Later restore syncing when needed
dropblock --unblock ~/Dropbox/videos ~/Dropbox/archives
How it works
The tool uses platform-specific methods to set or remove the ignore attribute:
Ignore Operation (Default)
- Windows: Uses PowerShell to set the
com.dropbox.ignoredstream - macOS: Uses
xattrto setcom.dropbox.ignoredattribute - Linux: Uses
attrcommand to setcom.dropbox.ignoredattribute
Unblock Operation (--unblock flag)
- 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.
Conflict handling
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.
Requirements
- Python 3.8+
- Platform-specific tools:
- Windows: PowerShell (built-in)
- macOS: xattr (built-in)
- Linux: attr package (
sudo apt install attron Debian/Ubuntu)
License
MIT
Metadata
Release files for dropblock-cli 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dropblock_cli-1.0.2.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dropblock_cli-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / dropblock_cli-1.0.2.tar.gz
| Download URL | dropblock_cli-1.0.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf8573c9ec7189b57a8f72a1df5014cc4759e4c10f7280865cd7c7a5a24e1fef
|
|
BLAKE2b-256 checksum How to use checksums |
938bd053d86f95ed493affdd85f4bc09bc88696513db0112e7885e2364767868
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2025.
Transparency logRelease files / dropblock_cli-1.0.2-py3-none-any.whl
| Download URL | dropblock_cli-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40a24818a2ca8df0a63c4ea4f1ca51f587775cf5ba28d56680395713b9ae9114
|
|
BLAKE2b-256 checksum How to use checksums |
87931d98939336c27ce9dc99e21648a87a88f3e6810a41ad36577acab5c98134
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2025.
Transparency log