The “Problem”
A common issue/request about Dropbox was about ignoring files without using
Selective Sync. Dropbox recently
introduced the ability to ignore specific files
or folders. Although the significance of the new feature, many users [
1,
2
,
3,
4] have expressed the importance of ignoring files from Dropbox using
Glob just like .gitignore
. For various
reasons Dropbox doesn’t seem to
have the will to implement such a feature :/
The walk-around
As a result, I decided to implement dropboxignore which is a simple shell
script that ignores files from Dropbox based on glob patterns. Additionally, existing .gitignore
files can be used to
automatically generate .dropboxignore
files.
The main difference between dropboxignore and the other relevant projects:
- rozbb/DropboxIgnore
- swapagarwal/dropbox_ignore
- ridvanaltun/dropbox-ignore-anywhere
- MichalKarol/dropboxignore
- mweirauch/dropignore
is the fact that dropboxignore is implemented in shell and has the minimum requirements (attr
package is the only
requirement)
dropboxignore is currently available only for Mac and Linux and has various features:
- Ignore/Revert specific files
- Automatically update
.dropboxignore
- Revert all ignored files
- Updated
.dropboxignore
based on changes in.gitignore
file. - Generate
.dropboxignore
files based on existing.gitignore
files. - Generate, update and ignore using a single command.
- Delete all
.dropboxignore
files.
A usecase
The simplest usage example could be this: Let’s say that you want to ignore every .txt
under your Dropbox folder, in
that case you only have to run the following command:
$ dropboxignore ignore *.txt
You can find more usage examples here. The full documentation of the project is available here
Things to not expect from dropboxignore
- Automatically ignore new matching files.
When a new file has been created and is matched by a .dropboxignore
file, user should re-ignore matching files. A
cronjob could solve this drawback.
- Automatically detect deletions from
.gitignore
files
Current implementation can detect and update .dropboxignore
file if an extra pattern has been added in the
corresponding .gitignores
but it can not handle deletions in the same way.