DEV Community

Cover image for dropboxignore: it's all about the missing .dropboxignore file
Panagiotis Simakis
Panagiotis Simakis

Posted on

dropboxignore: it's all about the missing .dropboxignore file

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

In computer programming, glob patterns specify sets of filenames with wildcard characters. For example, the Unix Bash shell command mv *.txt textfiles/ moves all files with names ending in .txt from the current directory to the directory textfiles. Here, * is a wildcard standing for "any string of characters" and *.txt is a glob pattern. The other common wildcard is the question mark (?), which stands for one character. For example, mv ?.txt shorttextfiles/ will move all files named with a single character followed by .txt from the current directory to directory shorttextfiles, while ??.txt would match all files whose name consists of 2 characters followed by .txt.

just like .gitignore. For various reasons Dropbox doesn't seems to have the will to implement such feature :/

The walk-around

Alt Text

As a result, I decided to implement

GitHub logo sp1thas / dropboxignore

It's all about the missing .dropboxignore file.



It's all about the missing .dropboxignore file.

<a target="_blank" rel="noopener noreferrer" href=""><img src="" style="max-width: 100%;"></a>
<a target="_blank" rel="noopener noreferrer" href=""><img src="" style="max-width: 100%;"></a>
<a href="" rel="nofollow">
    <img src="" alt="Documentation Status" data-canonical-src="" style="max-width: 100%;">
<a href="" rel="nofollow">
    <img alt="dropboxignore" src="" data-canonical-src="" style="max-width: 100%;">
<a target="_blank" rel="noopener noreferrer" href=""><img src="" data-canonical-src="" style="max-width: 100%;"></a>
Enter fullscreen mode Exit fullscreen mode

Exclude files from your dropbox using glob patterns and take advantage of existing .gitignore files.

This is a simple shell script that can be used to ignore files from dropbox using glob patterns, .dropboxignore files and the already existing .gitignorefiles. The shell script uses this approach to ignore the matched files.


  • Ignore folders or files based on glob patterns inside the .dropboxignore file.
  • Automatically generate .dropboxignore files based on existing .gitignore files.
  • Ignore specific folders or files via CLI.
  • Revert ignored folders or files
  • Delete .dropboxignore files
  • Update .dropboxignore files when changes are detected in corresponding .gitignore files.
  • List ignored files and folders

Getting Started

Basic Installation

dropboxignore is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl, wget or another similar tool. attr and git package should…

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:

GitHub logo rozbb / DropboxIgnore

An ignore file like .gitignore but for Dropbox

GitHub logo swapagarwal / dropbox_ignore

🔥 .gitignore for Dropbox!

GitHub logo ridvanaltun / dropbox-ignore-anywhere

A tool for help you to ignore files and folders in Dropbox.

GitHub logo MichalKarol / dropboxignore

Tool allowing for watching sync directory and setting Dropbox to ignore paths using .dropboxignore

GitHub logo mweirauch / dropignore

A tool to conveniently ignore files and folders from Dropbox sync.

is the fact that dropboxignore is implemented using shell and 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.

You can find more usage examples [here](]

Things to not expect from dropboxignore:

  1. 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.

  1. 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.

Discussion (0)