s.dospath([file] [flags])
s - str variable.
file - full path of file or folder. Default: s.
flags - one of the following values:
| 1 | Get long path. If flag 1 is not used, gets short path. |
In Windows, a file path can have two formats - long and short. Usually are used long paths, but also are supported short paths that were used in DOS. For example, short path version of "c:\program files\some folder\some file.txt" would be "c:\progra~1\somefo~1\somefi~1.txt" or similar. Some programs don't support long paths in command line, so you have to use short path. This function does conversion between long and short path versions.
The file/folder must exist, or the function will be unable to get short or long path. If it does not exist, or the function fails for some other reason, s receives unchanged file.
If file begins with a $spacial folder$ or %environment variable%, this function expands it.
Added in QM 2.2.0.