dos_expandenv - dalefugier/DOSLib GitHub Wiki
Expands environment-variable strings and replaces them with the values defined for the current user.
Syntax
(dos_expandenv path)
Parameters
path
The path to be expanded. The path can contain one or more environment-variable strings in the form: %variableName%
. For each such reference, the %variableName%
portion is replaced with the current value of that environment variable. Case is ignored when looking up the environment-variable name. If the name is not found, the %variableName%
portion is left unexpanded.
Returns
The expanded path if successful.
The original path if unsuccessful.
Example
Command: (dos_expandenv "%appdata%\\McNeel\Install.log")
"C:\\Users\\Dale\\AppData\\Roaming\\McNeel\Install.log"