DOS # Converte i nomi di file lunghi In modalita' DOS (non piu' di 8 caratteri)
Declare Function GetShortPathName Lib "KERNEL32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long Public Function GetShortFileName(ByVal FileName As String) As String Dim rc As Long Dim ShortPath As String Const PATH_LEN& = 164 ShortPath = String$(PATH_LEN + 1, 0) rc = GetShortPathName(FileName, ShortPath, PATH_LEN) GetShortFileName = Left$(ShortPath, rc) End Function FileName = path o nome del file da convertire Ritorna un nome DOS compatibile, pertanto si dichiarera': Dim Lblshort, LongName As String Lblshort = GetShortFileName(LongName) |