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
  1. Home
  2. General Programming
  3. C#
  4. Absolute to Relative Path

Absolute to Relative Path

Scheduled Pinned Locked Moved C#
com
4 Posts 3 Posters 0 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.
  • M Offline
    M Offline
    Mushtaque Nizamani
    wrote on last edited by
    #1

    There is a method GetFullPath http://msdn.microsoft.com/en-us/library/system.io.path.getfullpath.aspx[^] that converts relative to full absolute path. Does there any method exist that converts an absolute path to relative path.

    Thanks, Mushq

    C F 2 Replies Last reply
    0
    • M Mushtaque Nizamani

      There is a method GetFullPath http://msdn.microsoft.com/en-us/library/system.io.path.getfullpath.aspx[^] that converts relative to full absolute path. Does there any method exist that converts an absolute path to relative path.

      Thanks, Mushq

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      relative to what ? No.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      1 Reply Last reply
      0
      • M Mushtaque Nizamani

        There is a method GetFullPath http://msdn.microsoft.com/en-us/library/system.io.path.getfullpath.aspx[^] that converts relative to full absolute path. Does there any method exist that converts an absolute path to relative path.

        Thanks, Mushq

        F Offline
        F Offline
        Frank Horn
        wrote on last edited by
        #3

        Unfortunatly .Net seems to have an ugly gap here. but others have had this problem before, and you may get an idea here: http://mrpmorris.blogspot.com/2007/05/convert-absolute-path-to-relative-path.html

        M 1 Reply Last reply
        0
        • F Frank Horn

          Unfortunatly .Net seems to have an ugly gap here. but others have had this problem before, and you may get an idea here: http://mrpmorris.blogspot.com/2007/05/convert-absolute-path-to-relative-path.html

          M Offline
          M Offline
          Mushtaque Nizamani
          wrote on last edited by
          #4

          Sorry for the delayed reply but thank you very much for the useful answer. :)

          Kind Regards, Mushq

          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