dos_unexpandenv - dalefugier/DOSLib GitHub Wiki
Replaces certain folder names in a fully qualified path with their associated environment string.
Syntax
(dos_unexpandenv path)
Parameters
path
The path to be unexpanded. The following folder paths are replaced by their equivalent environment string:
| Folder | Environment String |
|---|---|
| The All Users profile folder | %ALLUSERSPROFILE% |
| The current user's application data folder | %APPDATA% |
| The system name | %COMPUTERNAME% |
| The Program Files folder | %COMPUTERNAME% |
| The system root folder | %SystemRoot% |
| The system drive letter | %SystemDrive% |
| The current user's profile folder | %USERPROFILE% |
Returns
The unexpanded path if successful.
The original path if unsuccessful.
Example
Command: (dos_unexpandenv "C:\\Users\\Dale\\AppData\\Roaming\\McNeel\Install.log")
"%APPDATA%\\McNeel\Install.log"