SHORT filename to LONG filename??? 
Author Message
 SHORT filename to LONG filename???

Is there a way to convert a Short filename to a Long filename. I know
how to do it the opposite way, but I have no clue how this could work.


Thank you so much!



Sun, 15 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???
I think I saw something like this in the Setup1 project that is in the
Visual Basic directory.
--
Later,
Jody


http://www.visual-statement.com/vb



Quote:
> Is there a way to convert a Short filename to a Long filename. I know
> how to do it the opposite way, but I have no clue how this could work.


> Thank you so much!



Sun, 15 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???
Niki,

Check out:

Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA"
(ByVal lpFileName As String, ByVal nBufferLength As Long, ByVal lpBuffer As
String, ByVal lpFilePart As String) As Long

If lpFileName is a 8.3 file name lpBuffer will return the "full" filename.
I've not tested it but the documentation seems clear.  By the look of it you
need to allocate space in the caller for both lpBuffer and lpFilePart
(containing the actual file name).

HTH

Peter

Quote:

>Is there a way to convert a Short filename to a Long filename. I know
>how to do it the opposite way, but I have no clue how this could work.


>Thank you so much!



Sun, 15 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???
Niki, take a look at the following MSKB article:

http://support.microsoft.com/support/kb/articles/q175/5/12.asp?FR=0

HOWTO: Get a Short Filename from a Long Filename
Article ID: Q175512
SUMMARY

Under certain circumstances, it may be necessary to get the Short Filename
equivalent of a file that has a Long Filename. The example below will allow
you to select a file that has a Long Filename and return it's Short Filename
using the GetShortPathName API Function call.

hth
galen


Quote:
>Is there a way to convert a Short filename to a Long filename. I know
>how to do it the opposite way, but I have no clue how this could work.


>Thank you so much!



Sun, 15 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???


Quote:
> Is there a way to convert a Short filename to a Long filename. I know
> how to do it the opposite way, but I have no clue how this could work.

Did you know that the long filenames are stored (together with their short
counterparts) in the directory ?  That's right, they are BOTH on your disk
..

Greetz,
  Rudy Wieser



Mon, 16 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???
On Wed, 27 Jan 1999 18:43:50 +0100, "Niki Wurster"

Quote:

>Is there a way to convert a Short filename to a Long filename. I know
>how to do it the opposite way, but I have no clue how this could work.



Try this:

Declare Function GetFullPathName Lib "kernel32" Alias _
"GetFullPathNameA" (ByVal lpFileName As String, ByVal nBufferLength _
As  Long, ByVal lpBuffer As String, ByVal lpFilePart As String) As
Long

This one converts the other way:

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

Ole
-
Ole I. Hougaard



Mon, 16 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???

Quote:

>Declare Function GetFullPathName Lib "kernel32" Alias _
>"GetFullPathNameA" (ByVal lpFileName As String, ByVal nBufferLength _
>As  Long, ByVal lpBuffer As String, ByVal lpFilePart As String) As
>Long

Be careful - this is very rev dependent and will not work on orginal Windows
95 systems.


Mon, 16 Jul 2001 03:00:00 GMT  
 SHORT filename to LONG filename???
On 28 Jan 1999 08:10:36 GMT, Caisson pondered:

Quote:
> Did you know that the long filenames are stored (together with their short
> counterparts) in the directory ?  That's right, they are BOTH on your disk
> ..

Maybe the file NAMES are, but certainly not the files themselves. Both filenames
point to the same place on the disk.

--
Alex Warren
email: take my name, remove the spaces, and add a writeme, a dot, and a com.
ICQ: 4043750

http://come.to/axe           - Axe Software: free/shareware for DOS & Windows
http://come.to/perdition     - mods (IT format)
-----------------------------------------------------------------------------
(please reply to the newsgroup - if you must reply by email, change the anti-
spam rubbish in the header to the email address prescribed above)



Tue, 17 Jul 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. SHORT filename to LONG filename???

2. Short Filename to Long Filename ???

3. Short filename to long filename

4. Long Filename -> Short Filename

5. Convert long filenames to short filenames

6. Convert Long Filenames to Short Filenames in VB4 16-Bit

7. Converting long filenames to short filenames in VB4.0 16-bit

8. Need to get the short filename from a long filename

9. Converting a Long FIleName to it's short equivalent (Both possible shorts)

10. Q: SendTo and short/long filenames?

11. Converting a Long Filename to Short.?

12. Long filenames VS short

 

 
Powered by phpBB® Forum Software