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.