PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
Files4Mask() |
This is an inbuilt function function provided by PPWIZARD.
The purpose of this function is to get a list of files matching a mask (such as "*.jpg"). The functioning of this call can be altered if required using a GETFILELIST hook. To get a list of directories you can use Dirs4Mask().
This function takes these parameters as follows:
In linux specify a directory name with a terminating slash to capture all files or subdirectories in that directory.
There is no return code from this call, some circumstances can cause PPWIZARD to abort.
The full (absolute) name of files is always returned.
EXAMPLE |
The following code lists all graphics files with the extension ".GIF" along with its height and width:
#DefineRexx '' ;--- Get list of GIF files (sort it) --- call Files4Mask "D:\DBAREIS\Projects\HOMEPAGE\graphics\*.gif", "gif",,"Y" #DefineRexx ;--- The "GIF" array now holds the list of files (GIF.0 = count) --- <p>There are <??gif.0> GIF files available as follows: <OL> ;--- List all the GIFs ---------- #{ FOR GifNumber = 1 to gif.0 ;--- Output full filename ---- <li><b><??gif.GifNumber></b> ;--- Lets output image size -- #evaluate ^^ ^fsize = GetImageHeightWidth(gif.GifNumber)^ (<??fsize>). #} </OL>