[Box Backup] Regex questions

Achim achim+box at qustodium.net
Mon Mar 29 12:36:29 BST 2010


Hello list:

After reading through the related "documentation" [1] (at this moment more
of a "works for me collection"), I am still banging my head against a
couple of issues. Solving them and updating the Wiki accordingly might be
beneficial for everybody.

OS X likes to pollute directories with its meta data that has filenames
such as ._.Trashes, ._WHATEVERFILE.EXT and directory names such as
.Spotlight-V100. I am able to exclude the directories (they have fixed
names), but I am struggling with the filenames that are dynamic.

A specific example:

BEFORE:
Synchronised file: F:\Set_9-Excludes\._.Trashes
Synchronised file: F:\Set_9-Excludes\.typeAttributes.dict

Now I want to exclude all files that start with ._ (dot underscore), but
not exclude those that only start with a dot (think: unix-y configuration
dotfiles!):

ExcludeFilesRegex = .+\._*|.*\\\._*

Skipping excluded file: F:\Set_9-Excludes\._.Trashes
Skipping excluded file: F:\Set_9-Excludes\.typeAttributes.dict

I have not been able to find a regex that distinguihes between those two
files, it appears that the underscore in the regex is ignored... or the
more likely explanation: I have no clue how this is supposed to work (-:

Thank you for any pointers, Achim

PS: And while we are at it, what does ".+\\~.*" exclude? It is mentioned
on [1] but has no explanation: my guess is "all files that start with tilde
dot", but why is the dot not escaped with a backslash such as in the other
examples?

PPS: Perhaps we could even generate a "best practice"
[file|dir]excluderegex?

[1] <http://www.boxbackup.org/trac/wiki/Win32Regex>



More information about the Boxbackup mailing list