Quote:

Since this could be scripted, the reason I ask for it to be implemented as a kix function is that one can never shorten to short filenames and be accurate.




What do you mean that you cannot be accurate?

This works for me:
Code:
$=SetOption("WrapAtEOL","ON")

$sPath="C:\Documents and Settings"
"Short path for '"+$sPath+"' is '"+funShortFN($sPath)+"'"+@CRLF

Function funShortFN($s)
Dim $oFSO,$oFile
$oFSO=CreateObject("Scripting.FileSystemObject")
If 16 & GetFileAttr($s)
$funShortFN=$oFSO.GetFolder($s).ShortPath
Else
$funShortFN=$oFSO.GetFile($s).ShortPath
EndIf
EndFunction