VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get a short file name by converting to 8.3 compliant file.

by Anonymous (267 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Sun 12th April 1998
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Get a short file name by converting to 8.3 compliant file.

API Declarations


Private Declare Function apiGetShortPathName Lib "Kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long


Rate Get a short file name by converting to 8.3 compliant file.



    Dim strReturnedShortFilename As String

    'initialize temporary string
    strShortFilename = String$(1000, " ")
    
    'create short filename
    apiGetShortPathName strLongFilename, strShortFilename, 1000
    
    'short filename
    strReturnedShortFilename = Left$(strShortFilename, Len(Trim$(strShortFilename)) - 1)


Download this snippet    Add to My Saved Code

Get a short file name by converting to 8.3 compliant file. Comments

No comments have been posted about Get a short file name by converting to 8.3 compliant file.. Why not be the first to post a comment about Get a short file name by converting to 8.3 compliant file..

Post your comment

Subject:
Message:
0/1000 characters