This include mask matches any subdirectory (at any depth), and matches all HTML files found at any depth. If we were copy remote files to the local machine, this mask results in subdirectories being created on the local machine which are empty because they didn't contain any HTML files on the remoth machine. Is there any way to avoid this?
Another question regarding masks: is there a wildcard which works a bit like * but covers arbitrary depth of subdirectories? So in the example above, if $ was such a wildcard, I would include all HTML files at any depth by specifying the include mask "$/*.html". (This would also avoid the issue discussed above.)
No. If I understand it right, you ask for the same thing as in the first question, just using different words. Right? :-)
This would be useful, because, for example, at the moment I have a transfer preset which uses the remote directory mask "*/public_html; */public_html/*; */public_html/*/*" which applies to a remote directory (at any depth) called public_html and also to exactly one or two levels of subdirectory below such a directory. I would like to be able to say "*/public_html/$" so that it matches any subdirectory of public_html at any depth. Without this, I am forced to add a new mask of the form "*/public_html/*/*/...../*/*" every time I want it to apply to a deeper subdirectory.
Maybe I'm missing something, but IMHO you can match anything below .../public_html using mask "*/public_html/*; */public_html/*/*". Shorter, but less precise form would be "*/public_html*/*".
(Note that the way of specifying a relative path---prefixing the path by */ as in "*/public_html"---is anomalous because * is not allowed to represent more than one piece (filepart or folderpart) of a path in any other situation than this. With a $ wildcard, the syntax could instead be "$/public_html".)
Technically, the last slash in mask (except for the trailing slash that indicates directory mask) separates the mask into two pieces: file mask and path mask. All other slashes are treated literally.