Getting a File's Dos Name and Path 
Author Message
 Getting a File's Dos Name and Path

Hi,
    How do you get a File's Dos(8.3) name and path?

    Thanks,
        Chanan



Sat, 29 Jul 2000 03:00:00 GMT  
 Getting a File's Dos Name and Path

Hi!

Use this:

Option Explicit

Declare Function GetShortPathName& Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long)

Function GiveShortPathName(ByVal lpszLongPath As String) As String

Dim lpszShortPath As String
Dim cchBuffer As Long
Dim result As Long

lpszShortPath = String(256, " ")

result = GetShortPathName(lpszLongPath, lpszShortPath, 256)
GiveShortPathName = Mid(lpszShortPath, 1, result)

End Function

Enjoy!
De E-Woud

Tip of the day: DON'T GET DESTROYED.

    Hi,
        How do you get a File's Dos(8.3) name and path?

        Thanks,
            Chanan



Sat, 29 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting DOS 8.3 path from Windows long file name

2. Getting a File's name and Path

3. ? How do you change a path to a dos path name

4. Getting the path or file name of running application

5. Getting dos short name for a file ????

6. Getting the path to a file's parent application out of the registry

7. Help, I'm getting Path/File Error

8. Api function to convert Long File Names To Short Dos File Names

9. How can i truncate long file name to get dos file name

10. Getting short file name from long file name:

11. Getting the user's logon name and computer name

12. DOS Compatiable Path Names

 

 
Powered by phpBB® Forum Software