PhotoStructure’s directory walker was rewritten in v2.1 to added glob support.
PhotoStructure comes built-in with several hundred exclusion patterns to avoid walking into system and application directories.
If any of these cause your files to be ignored, or you’re already using some other naming convention to exclude directories (instead of, for example, NoMedia),
globs should give you the flexibility to teach PhotoStructure to only import the files you want it to.
globssetting includes file path patterns to both force-accept or force-reject imported files.
Negative matches start with a
Positive matches don’t start with a
Order matters: the first pattern than matches will “win”.
If any of your
globsmatch, the built-in exclusion patterns will be ignored for that file or directory.
globs only overrides PhotoStructure’s built-in file and directory exclusion patterns. All of the other filters, including
(note this list is current as of v2.1, and should be expected to grow in future releases)
“Globs” are patterns that may include asterisks, like
/a/*/c (which matches any sub-directory within
/a that includes a file or sub-directory named
c), and other “magic” characters to match desired patterns.
*Matches 0 or more characters in a single path portion
?Matches 1 character
[...]Matches a range of characters, similar to a RegExp range. If the first character of the range is
^then it matches any character not in the range.
!(pattern|pattern|pattern)Matches anything that does not match any of the patterns provided.
?(pattern|pattern|pattern)Matches zero or one occurrence of the patterns provided.
+(pattern|pattern|pattern)Matches one or more occurrences of the patterns provided.
*(a|b|c)Matches zero or more occurrences of the patterns provided
**If a “globstar” is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories.
Even on Windows: back-slashes are for escaping characters.
If you’ve already been using a naming convention to organize files,
globs might help you teach PhotoStructure about these naming conventions.
For example, if you always put random screenshots that you don’t want in your library in a “screenshots” directory, add this pattern:
the exclamation at the beginning of the pattern tells PhotoStructure that this is a “negative” or “exclusion” match: things that match should not be imported.
PhotoStructure has a (ton!) of file patterns it uses to avoid “ignorable” directories. If any of these patterns turn out to skip a directory you wanted PhotoStructure to import, please tell me (either reply here, or ping me on Discord), but you can also tell PhotoStructure to omit that “ignorable” pattern.
As an example, Linux systems traditionally put files that have been recovered by
fsck into a directory called
lost+found. These files are frequently truncated or otherwise corrupt, though, so PhotoStructure “ignores” that directory by default.
If you coincidentally have photos in other directories that are called “lost+found” that you want to import, add this pattern:
scanPaths setting is what this section of the settings page edits:
scanPaths still drives what directories that are scanned.
In other words, if you add a glob pattern for
scanPaths is set to
MANUAL and doesn’t include
/photos (or any subdirectory), that glob pattern will be ignored.