Product Documentation

BTRV Edition User's Guide

Previous Topic

Next Topic

<map>

The map option replaces the file name or directory passed by the Btrieve application with the specified values.

The map option may contain the following sub-options:

<name> map option

The name option specifies the string that replaces the file name portion of the file path passed by the Btrieve application.

<dir> map option

The dir option specifies the string that replaces the directory portion of the file path passed by the Btrieve application.

Both of these options support substitution specifiers.

Examples

The following example replaces only the file name portion of the passed file path:

<map>

<name>CUSTMAST2010</name>

</map>

The following example replaces both the name and directory portion of the passed file path:

<map>

<name>CUSTMAST2010</name>

<dir>/Data2010</dir>

</map>

Multiple <file> Rules

If you have multiple <file> rules and you want all of the affected files to be located in a specific directory, you must define the <map> option for each <file> rule to which it applies. For example, if you have two <file> rules and you want both to be directed to a folder called my_files under a folder specified in an environment variable called CTREE, you need to add <map><dir>%(CTREE)/my_files</dir></map> to each <file> rule:

<file name="*.vis">

<map>

<name></name>

<dir>%(CTREE)/my_files</dir>

</map>

</file>

<file name="*">

<map>

<dir>%(CTREE)/my_files</dir>

</map>

</file>

Wildcards

If wildcards are used in the <file> matching rule, the <map> string does not replace the part of the file name or directory that matches a wildcard. Only the part of the file name that is specified explicitly is replaced by the <map> string.

Wildcard Example

The following example changes all file names ending with "2010" so that they end with "2013". If a file named CUSTMAST2010 is found, it will be changed to CUSTMAST2013.

<file name="*2010">

<map>

<name>2013</name>

</map>

</file>

In This Section

<name>

<dir>

TOCIndex