MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Files[Next]: FilesExcludeClear
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->FilesExclude

The "FilesExclude" Command

The "Files" command can be told to ignore some files (see the "EXLIST" parameter). These have probably already had special handling or need to be ignored altogether.

An "exclusion list" contains a list of zero or more filenames which can be added to by this command. Exclusion lists can be cleared by the "FilesExcludeClear" command.

The "File" and "Files" commands automatically adds found files to any specified exclude list.

This command is rarely used as the "Files" command creates an exclude list if none exists (and so it is typically easier just to specify a different list if required).

The macro takes these parameters:

EXAMPLE - No Filter

The following example adds all the files matching the 2 masks to the exclude list:

<$FilesExclude "selfreg_.mmh;Z*.mmh" EXLIST="XL_MMH">

EXAMPLE - With Rexx Filter

This example has been kept fairly simple while still demonstrating the main points, specifying a mask "b*" and then removing these same files is of course "stupid"...

;--- Define the filter ---
#DefineRexx 'StupidExcludeFilter'       ;;Not realistic but still demonstrates how to do it!
    @@Name = translate(FilePart('n', {$File}));
    if  left(@@Name, 1) = 'B' then
        {$Exclude} = 'N';               ;;Don't exclude any files whose names start with a 'B'...
    if  right(@@Name, 4) = '.REX' then
        {$Exclude} = 'N';               ;;Don't exclude any ".rex" files...
    @@ParentDir = translate(FilePart('n', FilePart('s', {$File})));
    if  @@ParentDir = 'CSV' then
        {$Exclude} = 'N';               ;;Don't exclude files if the paranet dir is "CSV"...
    ;call say 'DEBUG FILTER: ' || {$Exclude} || ' : ' || @@ParentDir || '\' || @@Name
#DefineRexx

;--- Use the filter ---
<$FilesExclude EXLIST="Fred" "c:\tmp\a*;b*" FILTER="StupidExcludeFilter">


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Files[Next]: FilesExcludeClear


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday December 09 2017 at 9:30am
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.