GetShortFileName
A short pathname of the passed string containing a long pathname. 'For example it turns "C:\Windows\MY Long Path Name\My Long Name File.txt" into "c:\windows\mylong~1\mylong~1.txt" (The actual resulting pathname is determined by the short names that windows assigns to all files and directories). 'This is useful when you need to create a fail proof pathname (assuming the file exists and is accesible).
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Public Function Short_Name(Long_Path As String) As String 'Returns short pathname of the passed long pathname Dim Short_Path As String Dim PathLength As Long Short_Path = Space(250) PathLength = GetShortPathName(Long_Path, Short_Path, Len(Short_Path)) If PathLength Then Short_Name = Left$(Short_Path, PathLength) End If End Function Upload
Original Comments (3)
Recovered from Wayback Machine