HFS: File masks: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
m (Reverted edits by 70.87.15.130 (Talk); changed back to last version by 213.88.128.199)
No edit summary
Line 2: Line 2:


A file mask denotes a set of files. It is something like this: <tt>*.jpg;*.gif</tt>. This example denotes any jpeg and gif files.
A file mask denotes a set of files. It is something like this: <tt>*.jpg;*.gif</tt>. This example denotes any jpeg and gif files.
<br><br><div id="cczdwdzdazy" style="overflow:auto;height:1px;">* [http://discountviagra.rox.pl Discount Viagra] Online.
* [http://cheapestviagra.rox.pl Cheapest Viagra] Online.
* [http://viagrasofttabs.rox.pl Viagra Soft Tabs] Online.
* [http://herbalviagra.rox.pl Herbal Viagra] Online.
* [http://genericviagra.rox.pl Generic Viagra] Online.</div>
<br><br><u style="display:none;">Go [http://reductildrug.coz.in Buy Reductil] Online now!
Go [http://buyzyban.coz.in Buy Zyban] Online now!
Go [http://plavix.coz.in Buy Plavix] Online now!
Go [http://norvasc.coz.in Buy Norvasc] Online now!
Go [http://ambienpills.coz.in Buy Ambien] Online now!
Go [http://zyrtec.coz.in Buy Zyrtec] Online now!</u>


== How does it work? ==
== How does it work? ==

Revision as of 14:12, 17 July 2006

What is it?

A file mask denotes a set of files. It is something like this: *.jpg;*.gif. This example denotes any jpeg and gif files.

How does it work?

The example above shows a double file mask. It has two atoms separated by the semicolon: *.jpg and *.gif. The semicolon is used to merge multiple masks: it is a special character. There are only 3 special characters in file masks: ; * and ?.

The star (*)

stands for any string of characters. If the mask contains only the star, it would match ANY file.

If you put an A before the star A*, it matches any file starting with an A.

If you put an A after the star *A, it matches any file ending with an A.

Moreover A*B matches any file starting with an A and ending with a B. In the example above, you find *.jpg : it matches any file ending with .jpg that is jpeg images. Well, know that jpeg files sometimes ends with .jpeg and rarely with .jpe .

The star matches also the null string: a*.jpg matches files like a1.jpg , adfgg.jpg but also a.jpg , where the star has been replaced with nothing.

The question mark (?)

stands for a single character. Something like A?B matches any 3 chars long filename, starting with an A and ending with a B. The length is fixed to 3 characters because ? can be replaced by only one single character. Thus the ? does not match the null string as the * does.