'短文件名转换成长文件名
'GetLongFilename(ByVal sShortName as String) as String
#Include Once "dir.bi"
Function GetLongFilename(ByVal sShortName as String) as String '短文件名转换成长文件名
   Dim sLongName as String
   Dim sTemp as String
   Dim iSlashPos as Integer
   'Add \ to short name to prevent Instr from failing
   if Right(sShortName,1)<>"\" Then  sShortName = sShortName & "\"
   'Start from 4 to ignore the "[Drive Letter]:\" characters
   iSlashPos = InStr(4, sShortName, "\")
   'Pull out each string between \ character for conversion
   While iSlashPos
      sTemp = Dir(Left(sShortName, iSlashPos - 1), fbNormal + fbHidden + fbSystem + fbDirectory) ' vbNormal + vbHidden + vbSystem + vbDirectory)
      If sTemp = "" Then
         'Error 52 - Bad File Name or Number
         Function = ""
         Exit Function
      End If
      sLongName = sLongName & "\" & sTemp
      iSlashPos = InStr(iSlashPos + 1, sShortName, "\")
   Wend
   'Prefix with the drive letter
   Function = Left(sShortName, 2) & sLongName
End Function