'From:  taplang Fri Dec 13, 2002  10:23 am
' Get shortname

     DECLARE FUNCTION GetShortPathName LIB "kernel32" _
      ALIAS "GetShortPathNameA"(ByVal lpszLongPath AS STRING, _
      ByVal lpszShortPath AS LONG, ByVal lBuffer AS LONG) AS LONG

     filePath$ = STRING$(100,0)
     INPUT "Long filename: ", longFileName$
     FilenameLength = GetShortPathName(longFileName$,VARPTR(filepath$),99)
     shortFileName$ = LEFT$(filepath$,FilenameLength)
     PRINT shortFileName$
     INPUT A

'filePath$ is a null-terminated string that you reserve as your
'container

'longFileName$ is supplied by the user. It must include the full path.
'Besides manual input through INPUT, you can also use QOPENDIALOG to
'get the full path and full file name.

'lBuffer in the API declaration must always be less than the number of
'nulls that you reserved through STRING$

