Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to convert absolute path to relative path?

How to convert absolute path to relative path?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpjavaquestionc++
5 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sachin Gedam
    wrote on last edited by
    #1

    Hello Friends, Please help me.. How can I get the relative path for a folder? Is there a function in vb,vb.net,c#,java,c or C++ which generates the relative path depending on two input-paths, like: RelativePath = GetRelativePath(strSelectedFolder, strBaseFolder) Or anybody have expert-exchange login then do login for me and get the solution from there: https://secure.experts-exchange.com/register.jsp?query=relative+path&clearTAFilter=true&srid=ANaQRBFkNu6qNzcPciZwgw%3D%3D&redirectURL=%2Fsearch.jsp%3Fquery%3Drelative%2Bpath%26clearTAFilter%3Dtrue%26rsid%3D10%26begin%3D11&rsid=10 Waiting for your valuable reply. Sachin Gedam (Software Engg.) Pune India

    S C D 3 Replies Last reply
    0
    • S Sachin Gedam

      Hello Friends, Please help me.. How can I get the relative path for a folder? Is there a function in vb,vb.net,c#,java,c or C++ which generates the relative path depending on two input-paths, like: RelativePath = GetRelativePath(strSelectedFolder, strBaseFolder) Or anybody have expert-exchange login then do login for me and get the solution from there: https://secure.experts-exchange.com/register.jsp?query=relative+path&clearTAFilter=true&srid=ANaQRBFkNu6qNzcPciZwgw%3D%3D&redirectURL=%2Fsearch.jsp%3Fquery%3Drelative%2Bpath%26clearTAFilter%3Dtrue%26rsid%3D10%26begin%3D11&rsid=10 Waiting for your valuable reply. Sachin Gedam (Software Engg.) Pune India

      S Offline
      S Offline
      sps itsec46
      wrote on last edited by
      #2

      Hi Sachin, check out this nice CodeProject article here[^] The described class can everything you want. Especially check the section Relative path methods. Regards, mykel If they give you lined paper, write the other way!

      S 1 Reply Last reply
      0
      • S sps itsec46

        Hi Sachin, check out this nice CodeProject article here[^] The described class can everything you want. Especially check the section Relative path methods. Regards, mykel If they give you lined paper, write the other way!

        S Offline
        S Offline
        Sachin Gedam
        wrote on last edited by
        #3

        Dear Mykel, Thanks for your kind reply. I got one more and effective solution which is exactly feet to my requirement. http://www.freevbcode.com/ShowCode.asp?ID=968 Thanks for your help. ~Sachin Sachin Gedam (Software Engg.) Pune India

        1 Reply Last reply
        0
        • S Sachin Gedam

          Hello Friends, Please help me.. How can I get the relative path for a folder? Is there a function in vb,vb.net,c#,java,c or C++ which generates the relative path depending on two input-paths, like: RelativePath = GetRelativePath(strSelectedFolder, strBaseFolder) Or anybody have expert-exchange login then do login for me and get the solution from there: https://secure.experts-exchange.com/register.jsp?query=relative+path&clearTAFilter=true&srid=ANaQRBFkNu6qNzcPciZwgw%3D%3D&redirectURL=%2Fsearch.jsp%3Fquery%3Drelative%2Bpath%26clearTAFilter%3Dtrue%26rsid%3D10%26begin%3D11&rsid=10 Waiting for your valuable reply. Sachin Gedam (Software Engg.) Pune India

          C Offline
          C Offline
          Cool Ju
          wrote on last edited by
          #4

          Hi, Try CPath ATL Class. Bye, Cool Ju :cool: Dream Ur Destiny

          1 Reply Last reply
          0
          • S Sachin Gedam

            Hello Friends, Please help me.. How can I get the relative path for a folder? Is there a function in vb,vb.net,c#,java,c or C++ which generates the relative path depending on two input-paths, like: RelativePath = GetRelativePath(strSelectedFolder, strBaseFolder) Or anybody have expert-exchange login then do login for me and get the solution from there: https://secure.experts-exchange.com/register.jsp?query=relative+path&clearTAFilter=true&srid=ANaQRBFkNu6qNzcPciZwgw%3D%3D&redirectURL=%2Fsearch.jsp%3Fquery%3Drelative%2Bpath%26clearTAFilter%3Dtrue%26rsid%3D10%26begin%3D11&rsid=10 Waiting for your valuable reply. Sachin Gedam (Software Engg.) Pune India

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Sachin Gedam wrote:

            How can I get the relative path for a folder?

            Use PathRelativePathTo().


            "Take only what you need and leave the land as you found it." - Native American Proverb

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups