BuildForge Help

Selecting the Next Available Drive Letter

You can have the system pick the next available drive letter. Use the following syntax:
<driveletter>?=//<directory path>
For example, you can set _MAP as follows:
X?=//server/share
In this case the system does not map a drive to X. Instead, it maps to the next available drive, and stores the drive letter it selected in a variable named _MAP_X; if the selected drive is F, the _MAP_Y variable's value is "F:". You can use the variable to access the mapping.

You can use any letter you like, and you can even use multiple mappings, as follows:

X?=//server/share; Y?=//server/public

If this example is run on a machine whose next available drive letter is F, it creates the following mappings:

The example also creates the following variables:

Note: If you use the next available drive syntax when targeting a Windows® system that uses Cygwin, you must escape the question mark with a backslash as follows:
Y\?=//server/share