Using “Ignore Pattern”

The Ignore Pattern on the Settings/Advanced tab is a useful and often overlooked JAlbum feature. For example, where one simply wants to exclude a folder (or a number of similarly named folders), just enter the relevant name into the JAlbum>Advanced/Ignore Pattern. It is case insensitive and accepts spaces.

It may seem to do the same job as the main GUI right-click/Exclude function to exclude album files and/or folders, but its true value comes when there is any recognizable pattern that holds for all possible file/folder names to be excluded. This obviously hints that suitable naming of folders, for instance, can significantly help in future album building. Also, the Ignore Pattern can be programmed via the Console Mode (see Using Console Mode With Chameleon & Hidden or Private Folders , for example).

So, a folder structure that has a mix of photos and video can easily exclude the video if the folder names are chosen appropriately (say they use the text “Video”). Thus, use the simple text video for folders only named “Video”, and .*video.* for folders named something like “January Videos”.

Remember that * alone doesn’t do the wildcard trick, you have to write .* , where . means ” any character, but not more than one ” and * means ” any number of the character before “.

The actual combinations and characters that can be used in a valid regular expression (like the .* used before the video* in the above example) are outside the scope of this tutorial, but another expression example can be given that proves instructive:

(video)|((\.|_).*|.*\.(avi|wmp|wma|voc|mid|au|rm)) 

This ignores a folder called Video, and a *.avi, *.wmp etc file in any folder.

A problem with the Console Mode is that the above combined pattern, using the pipe | character, does not work. Careful folder naming may make it possible to use a simple form, like Video.* , but it can be restrictive.

An alternative “ignore pattern” method that can be programmed via the Console Mode is to exclude folders in the main .jap project file (which creates the associated albumfiles.txt file). Then when required in the batch file, rename the albumfiles.txt to albumfiles.ignore such that the following .jap call does not exclude anything, then rename it back for the next .jap call. This has the advantage of much better control over folder exclusions, as there no naming restrictions, and is a little more visible.

Yet another Console Mode workaround is to use another .jap file, a copy of the primary one but with the more complex GUI-based Ignore Pattern added. This can be called when appropriate to ignore the required folders, and the primary one can be used to carry on with the album build.

Leave a Reply