A private folder should not be visible when you navigate from the top down into the different folders but only if you share/sent somebody the direct link to that “private folder”. The process is as follows:
- Create the album (use Make Changes or Make All, as appropriate)
- Exclude the folder(s)
- Re-make the album
Note that if the “private” folder is a 1st-level sub-folder (and not located further down the folder structure), then the re-make will be a lot faster if you do not select Process subdirectories.
Following on, this is a good candidate for a command file (Console Mode) that makes use of a good tip from alan927 (http://jalbum.net/forum/message.jspa?messageID=120929#120929).
One can exclude folders in a project (.jap) GUI, and the info is stored in albumfiles.txt
. However, it is not possible programmatically to exclude folders. The workaround is the alan927 renaming trick.
The project xxx.jap
file should have all the folders included. Copy the albumfiles.txt file to a new text file named, say, Private_Folder_albumfile.txt with the “private” folder only preceded with a “ – ” to mark it as excluded. Thus
albumfile.txt
Folder 1 Folder 2 Private Folder
Private_Folder_albumfile.txt
Folder 1 Folder 2 -Private Folder
The .cmd file has the code:
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "xxx.jap" -appendImages Rename albumfiles.txt albumfiles.DONOTUSE Rename Private_Folder_albumfile.txt albumfiles.txt java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "xxxs.jap" -appendImages Rename albumfiles.txt Private_Folder_albumfile.txt Rename albumfiles.DONOTUSE albumfiles.txt
Alternatively, the “private” folder can be excluded using the Ignore Pattern feature of JAlbum (see the tutorial Using “Ignore Pattern”). In this case, a simple 2-pass batch file can be used accordingly, where the 2 nd pass uses the parameter -ignorePattern "private" folder
. Note that "private" folder
would literally be the folder name, with no ""
. See the Console mode tutorial.
A word of warning: the Ignore Pattern is one of the oddities in the Console Mode, and problems may occur with some characters (namely the | pipe character). See Ignore Pattern. The use of conventional folder names is strongly recommended!
Using a Hidden Folder to store a Zip file
It is occasionally desired to have a single zip file, easily downloadable, that contains the original images used in the album. This is easily achieved with a hidden folder and link, given that JAlbum itself recognises zip files (well, almost … see later ….).
Create the zip file and locate it in the “hidden” folder. A suitable link can be used to open that folder’s Index Page. Right-click the zip file’s thumbnail, then Save As will allow the file to be downloaded to the local PC.
However, JAlbum v7.1 seems to support zip files when they exist in the top-level folder, only. When a zip exists in a sub-folder, the build fails with an “Unsupported File Format” error message.
A workaround:
Use a 2-pass build; process the dedicated “hidden” zip folder first, then the album as normal. The project jap file can exclude the zip folder, if necessary, in which case a comment link or similar is required to access that folder’s Index Page.
The url can be given to a user, and therefore no indication of the existence of the “hidden” zip folder will be directly visible in the album.
3 replies on “Hidden or private folders”
[…] best done via a command file using Console Mode . The technique is much the same as that shown in Hidden or Private Folders, except that the 2 items are the “Favourites” comments.properties file and the output […]
[…] tutorial presents a few interesting uses related to “hidden folders“. See the tutorial Hidden or Private Folders. The Enhanced Picture comment can be used as an effective “Folder Link” to part of an […]
[…] Programmatically created Hidden or Private Folders (see Hidden or Private Folders). […]