Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

GetShortFileName - Convert a filename to 8.3 format

Total Hit ( 4236)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 



Click here to copy the following block
Private Declare Function GetShortPathName Lib "kernel32" Alias _
  "GetShortPathNameA" (ByVal lpszLongPath As String, _
  ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

' Convert a long filename into the short 8.3 format
' if the file doesn't exist, return a null string

Function GetShortFileName(ByVal LongFileName As String) As String
  Dim buffer As String, length As Long
  ' Prepare the receiving buffer
  buffer = Space$(300)
  length = GetShortPathName(LongFileName, buffer, Len(buffer))
  ' if return value was non-zero, estract the result
  ' else, it returns a null string (probably
  GetShortFileName = Left$(buffer, length)
End Function


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.