Function LongName(strFullPathAndFile) Dim strOriginalFile Dim fs, fil, fils, fol Dim blnFound Set fs = CreateObject("Scripting.FileSystemObject") blnFound = False strOriginalFile = fs.GetFile(strFullPathAndFile).ShortPath Set fol = fs.GetFolder(fs.GetParentFolderName(strFullPathAndFile)) Set fils = fol.Files For Each fil In fils If fil.ShortPath = strOriginalFile Then strOriginalFile = fil.Path blnFound = True Exit For End If Next If blnFound Then LongName = strOriginalFile Else LongName = strFullPathAndFile End If End Function