Listbox short file names

murrayf1

Member
Joined
May 5, 2006
Messages
21
Programming Experience
1-3
Hi,
Im trying to list shortfile names from a directory in a listbox, i can list the long file name no problem but the other application in trying to pass the names to needs short file names.

Any ideas?
 
Use this:

VB.NET:
    Private Declare Auto Function GetShortPathName Lib "kernel32.dll" ( _
    ByVal LongPath As String, _
    ByVal ShortPath As String, _
    ByVal buff As Int32 _
    ) As Int32
 
Usually when passing string parameters with spaces to console applications you have to enclose them with double quote characters, example:
DIR "C:\Documents and Settings"
 
Back
Top