I have this path :
c:\dev\myapp\dirA\..\dirB\myfile.txt
how to expand it to :
c:\dev\myapp\dirB\myfile.txt
Is their any Delphi functions to do this or any winapi function ?
CodePudding user response:
You can use the SysUtils.ExpandFileName()
function.
ExpandFileName('c:\dev\myapp\dirA\..\dirB\myfile.txt');
Result:
c:\dev\myapp\dirB\myfile.txt