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. Visual Basic
  4. How convert win path to dos path [modified]

How convert win path to dos path [modified]

Scheduled Pinned Locked Moved Visual Basic
6 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.
  • N Offline
    N Offline
    Narenge
    wrote on last edited by
    #1

    Hi guys. How i can convert such a windows base address :

    C:\Documents and Settings\Sina\My Documents\My Pictures\p1(2).jpg

    to Dos style path like :

    C:\docume~1\sina\mydocu~1\...

    Tnx for your reply ;) -- modified at 17:21 Tuesday 22nd May, 2007

    D 1 Reply Last reply
    0
    • N Narenge

      Hi guys. How i can convert such a windows base address :

      C:\Documents and Settings\Sina\My Documents\My Pictures\p1(2).jpg

      to Dos style path like :

      C:\docume~1\sina\mydocu~1\...

      Tnx for your reply ;) -- modified at 17:21 Tuesday 22nd May, 2007

      D Offline
      D Offline
      Dave Herren
      wrote on last edited by
      #2

      I believe GetShortPathName[^] will do what you need. I would like to think there is an easier way, but I am not aware of one.

      topcoderjax - Remember, Google is your friend.

      N 1 Reply Last reply
      0
      • D Dave Herren

        I believe GetShortPathName[^] will do what you need. I would like to think there is an easier way, but I am not aware of one.

        topcoderjax - Remember, Google is your friend.

        N Offline
        N Offline
        Narenge
        wrote on last edited by
        #3

        tnx for your reply. But it's not the style i wanted. i want get full dos mode path like it: C:\Docume~1\Sina\MyDocu~1\MyPict~1\p1~1.jpg

        D D 2 Replies Last reply
        0
        • N Narenge

          tnx for your reply. But it's not the style i wanted. i want get full dos mode path like it: C:\Docume~1\Sina\MyDocu~1\MyPict~1\p1~1.jpg

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          That IS the "DOS mode" path, as you call it.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          1 Reply Last reply
          0
          • N Narenge

            tnx for your reply. But it's not the style i wanted. i want get full dos mode path like it: C:\Docume~1\Sina\MyDocu~1\MyPict~1\p1~1.jpg

            D Offline
            D Offline
            Dave Herren
            wrote on last edited by
            #5

            I believe what I gave you should have given you the dos path, in the format that you showed. If it gave you something different please show me what it was, as I am confused how this isn't meeting your needs.

            topcoderjax - Remember, Google is your friend.

            N 1 Reply Last reply
            0
            • D Dave Herren

              I believe what I gave you should have given you the dos path, in the format that you showed. If it gave you something different please show me what it was, as I am confused how this isn't meeting your needs.

              topcoderjax - Remember, Google is your friend.

              N Offline
              N Offline
              Narenge
              wrote on last edited by
              #6

              Wow.Great. Tnx for your reply.

              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