|
-
April 30th, 1999, 10:52 AM
#1
How DOS will call the "MyDirWithALongName" directory?
Can I know how DOS will truncate and call a directory I created under Windows 9x or (NT) whose name is longer than 8 characters?
Thanks in advance.
Bye.
_______
-
April 30th, 1999, 11:13 AM
#2
Re: How DOS will call the "MyDirWithALongName" directory?
The way it's typically done is that the first 6 non-whitespace characters are used, then a tilde (~) character is added, then a number. So, if you have two directories named:
My Awesome Docs
My Awesome Images
They will be converted into:
myawes~1 (Short for My Awesome Docs)
myawes~2 (Short for My Awesome Images)
If you need to get this conversion programmatically, then there's a Win32 function called GetShortPathName() that takes a LFN path and converts it to a SFN.
NOTE: The path in question must actually exist on the PC for this function to work correctly. If it doesn't exist, GetShortPathName() will return an error.
Hope this helps! Good luck, and happy coding!
Valerie Bradley
http://www.synthcom.com/~val
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|