The function of path object to obtain absolute path

The path object adds a method or property to obtain the absolute path, which can return the absolute path of the path.

The path object cannot correctly return the path containing system variables, for example:

DOpus.FSUtil.NewPath("%temp%\test.txt") 'reutrun %temp%\test.txt
DOpus.FSUtil.NewPath("%temp%\..\test.txt") 'reutrun %temp%\..\test.txt

Expected value

C:\Users\qiuqiu\AppData\Local\Temp\text.txt
C:\Users\qiuqiu\AppData\Local\text.txt

Try the FSUtil.Resolve function

I just saw this method, but it can only resolve system variables, not relative paths

strFileName = "%temp%\..\text.txt"
dopus.output DOpus.FSUtil.resolve(strfilename)

output

C:\Users\qiuqiu\AppData\Local\Temp\..\text.txt

You can use GetAbsolutePathName for that. A quick forum search shows you're already using it in some of your other scripts.