开发者

delphi remove . and .. from path

How can I remove the . and .. from a path in Delphi (not using .NET). I need a function开发者_开发百科, so I can pass it something like 'c:\program files..\program files...', and I want the function to return to me 'c:\'.

Can Delphi do that on its own? Or do I need to do it myself?


Maybe this is what you are looking for:

SysUtils.ExpandFileName('c:\temp\.\test\..\test2')

It returns the absolute path with all relative parts removed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜