Skip to main content
gamedev.net
🔒 Locked

DOS paths...

Started by The Heretic 4 replies 1.3k views
Original Post
The Heretic
The Heretic
Is there a function to take paths with the ~1 or ~2 in them and make them into full windows paths? For example: "C:\MyDocu~1\" -> "C:\My Documents\" I''ve looked on MSDN and google and I haven''t been able to find much so any help is appreciated!
Zipster
Zipster
Technically, old DOS paths should still work with whatever you do. The only problem is figuring out which folder is associated with ~1, ~2, etc. I predicted it would be alphabetical, but tests confirmed it wasn''t.
The Heretic
The Heretic
They don''t do. I''m testing them against stored paths and I need to be able to get the full path to do this.
cowsarenotevil
cowsarenotevil
You need to convert the full paths to dos paths. No one, even humsns () can convert ~1 to the latter letters (heh) of the path.




-~-The Cow of Darkness-~-

If you see the image I am online
-~-The Cow of Darkness-~-
The Heretic
The Heretic
That would work except that leads to glitches. If new paths are made then the ones that map to the shortened ones can be shifted down from say ~1 to ~2. This would lead to errors and so is also not an option.
Mastaba
Mastaba
In Windows98 and later, GetLongPathName should do the trick.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.