How do I prevent a directory from being imported into my library?
When PhotoStructure is importing files, it automatically excludes all hidden files, as well as operating system and application support directories.
Additionally, across all platforms, the following rules are also applied:
NoMedia đź”—
The contents of a directory that has a .nomedia
entry is ignored.
PhotoStructure extends this standard to make it easier to work with:
- Case doesn’t matter.
NOMEDIA
,NoMedia
, andnomedia
will all work. - The
NoMedia
directory entry can be a file or a directory. - The file or directory may or may not start with a period:
nomedia
and.nomedia
will both work. - The
NoMedia
file or directory may be marked as hidden (PhotoStructure will still see it). NoMedia
is applied recursively to all children. For example, if you add aNoMedia
file to an external hard drive’s root directory, no files from that entire drive will be imported.
To create a NoMedia
file, navigate to the folder (or hierarchy of folders) that you want to exclude from PhotoStructure, right-click and pick “New Folder”, and rename it to NoMedia
.
Dotfiles đź”—
If a directory or file starts with a period, or “dot,” its contents will be ignored. On Mac and Linux, this will hide the file or directory from the Finder or Files browser (unless you enable “show hidden files”).
⚠️ Note that the Windows 10 Explorer can’t create dotfiles, as it interprets them as an invalid “nameless extension,” but you can create them via the terminal.
Hidden files via attrib
or SetFile
đź”—
Mac and Windows both support hiding files via file attributes, but this requires the use of a the command line tool SetFile
on a Mac, or attrib
on Windows.
⚠️ Note that some backup software and copying files or directories with these attributes from your NAS and back may strip these attributes, depending on what software you’re using.
TL;DR: What should I use to hide a directory? đź”—
We recommend using NoMedia
:
- it works on Windows, Mac, and Linux
- it works on all network file systems
- its supported by all backup software, and
- it’s easy to work with using GUI tools like the Mac Finder or Windows Explorer.
When do directories newly-marked with NoMedia take effect? đź”—
If PhotoStructure is in the middle of a sync, it may take up to a minute for PhotoStructure to see your new NoMedia folder due to internal filesystem caching.
If you’re using automatic organization, there may be files that are now in NoMedia directories that were copied into your PhotoStructure library. The original files, on disk, will not be deleted from your library, but the assets will not be shown in the PhotoStructure interface.
As of version 0.9, PhotoStructure added a “cleanup” phase to sync which marks assets found to be in NoMedia directories as “excluded.”
In other words, PhotoStructure needs to complete a “sync” for a given directory before it detects and excludes any effected assets.