comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: relative path from one absolute path to another?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: relative path from one absolute path to another? [message #49679 is a reply to message #49673] Tue, 08 August 2006 07:38 Go to previous messageGo to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
I'd be surprised if you can do it without programming, but it shouldn't
be hard. Split the path using strsplit() and path_sep(), count how many
first elements are the same, add a chain of '..'+path_sep() to equal
the remaining elements in your from-path, and tack on the remaining
elements of the to-path.

regards,
Greg



born.in.sssr@gmail.com wrote:
> Hi all,
> is there an easy way (without string scripting) to get the relative
> path from one absolute path to another (platform independent:
> unix+win)?
> In the kind of:
> rel_path = get_rel_path(from_path, to_path)
> Thanks, Maxim
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interactive mode in IDL
Next Topic: Comparing Pixel Values in Images With IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 00:30:21 PDT 2025

Total time taken to generate the page: 0.64159 seconds