How to obtain Relative path from Absolute path?
Hi,
How do I obtain the relative path (e.g. "..\..\Test.tmp" ) from the absolute path ( "C:\Test.tmp" ) with respect to a directory (e.g. C:\Temp2\Dir2 )? This should work irrespective of where the file Test.tmp is stored.
Do you have any sample code which could help me do this?
Any help would be greatly appreciated.
Thanks and Regards,
SN
Re: How to obtain Relative path from Absolute path?
Re: How to obtain Relative path from Absolute path?
Not sure PathRelativePathTo is exactly the function you need, but you can see an example here:
http://www.freevbcode.com/ShowCode.asp?ID=6137
JeffB