Help for this page

Select Code to Download


  1. or download this
    DWORD GetShortPathName(
      LPCTSTR lpszLongPath,  // null-terminated path string
      LPTSTR lpszShortPath,  // short form buffer
      DWORD cchBuffer        // size of short form buffer
    );
    
  2. or download this
    use Win32::API;
    
    ...
    $shortname = substr($shortname,0,$retval);
    
    print "longname = \n\"$longname\", \nshortname = \n\"$shortname\"";
    
  3. or download this
    C:\temp>perl shortname.pl
    longname =
    ...
    shortname =
    "C:\PROGRA~1\MICROS~3\Office\OLREAD9.TXT"
    C:\temp>