Add subdirectory path to custom blacklist to prevent uploading

I’ve seen several posts on here about how to prevent a specific folder from syncing or being uploaded, either by prefixing the directory with “~” or adding the directory name to the advanced custom blacklists.

However, do wildcards work with the blackListPrefixes or blackListContains array of files and paths as well? For example, I have a series of projects that each contains a /build/ directory that I don’t want uploaded nor synced. I’d like to add a single blacklist item, like “/company/projects//build”, and that would tell ODrive to not upload anything from each project’s build directory.

Unfortunately I can’t prefix the directory with “~” since other programs and processes are looking for this directory name specifically.

Is this possible currently? It doesn’t seem to be working, but perhaps I have my custom blacklist path set up wrong.

Hi @u10int ,
You can use the blackListNames advanced configuration parameter to ignore all folders with the name “build”.

Take a look at our documentation here for more details, and let me know if you have any questions:

Thanks @Tony. I know you can ignore folder names, but my use case is I don’t want to ignore all directories named “build” but rather only those under a certain path pattern. For instance, I want some “build” directories to be synced, just not all depending on parent project directory.

Hi @u10int ,
Sorry, I misunderstood.

Currently this isn’t possible since we are only looking at the file or folder name and not the full path, but it should be possible for us to match against a path.

Another little wrinkle is that we don’t support any wildcard character processing/matching. I am guessing this would be required for what you are trying to do.

Can you provide a real-world-ish example for how you would hope to specify this?

Maybe I’m thinking something similar to what gitignore supports: Git - gitignore Documentation

For example, I could add the following to my blackListContains array (or with a new blackListPatterns option) to have it ignore all of the build directories across all projects of a single client, e.g.:


But this would still allow other build directories that don’t match this pattern, e.g. not under this client’s project directories.

1 Like

Something else worth considering is supporting .odriveignore files throughout the file structure. This would allow you to customize sync ignore rules per directory and subdirectories under that parent rather then trying to store all of this in the current single global ignores configuration. Odrive would then just check for the existence of an .odriveignore file per directory when running through its sync process and follow the ignore rules for that directory accordingly. This would be extremely flexible and probably easier to maintain from the user perspective.