Using AUTOFAV to add to File Lists

When working on a project that involves many files, it can be convenient to have these files stored in a Favorites File List.  However, if files are created frequently, it can be easy to forget to consistently issue a FAVORITE primary command every time.  If that command is forgotten, your favorites list can be incomplete.  


It is now possible to issue a SET command, so that whenever a file matching a particular file pattern (mask) is created or saved, a corresponding entry will be automatically created in a Favorites File List.  Because SET names are a global resource, the AUTOFAV feature applies to every file that matches the file pattern(s), regardless of what profile they are associated with.


Setting up an AUTOFAV request


Creation of an AUTOFAV request is done with a SET command, using the format:


SET AUTOFAV.filemask = filelist-name


Here, filemask is a simple standard file mask string to specify what files are to be included, and filelist-name is the name of the File List to which the name is to be added.


For example, to place every new or saved file having a name like ABC*.TXT into the ABC_PROJECT File List, you would issue the command:

SET AUTOFAV.ABC*.TXT = ABC_PROJECT


You may create multiple SET entries with different masks, all referring to the same File List; this is not a problem.


NOTE: Because of the use of wildcard characters * and ?, it is possible that you may create multiple SET entries that could apply to a particular file-name.   Which one takes precedence?  The SET entries are maintained in alphabetical order, and the first one which causes a match will be the one used, even if a SET further down alphabetically is 'more specific'.


Example:        Given the two SET entries,


SET autofav.*.txt = Temp1

SET autofav.ABC*.txt = Temp2


the file ABC.TXT would be added to the Temp1.FLIST even though the ABC*.txt mask is more specific.


Note:  Because the SET list is maintained in alphabetical order, and gets re-sorted each time it is modified, the order you create your SET entries - whether by using the SET command or by direct editing in a SET Edit session - may not be the order in which the entries are stored.  If you have any question on this, issue a SET command with no operands to enter a SET Edit session, after any changes have been made to it.  That way, you will be able to see the (newly sorted) order of the SET names.


Using AUTOFAV with Named and standard File Lists







Created with the Personal Edition of HelpNDoc: Free Kindle producer